|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-01-11 16:34 UTC] obibann at hotmail dot com
[2013-01-11 16:51 UTC] derick@php.net
-Status: Open
+Status: Not a bug
[2013-01-11 16:51 UTC] derick@php.net
[2013-01-12 09:21 UTC] obibann at hotmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Jan 01 06:00:01 2026 UTC |
Description: ------------ Set your server on December 30 2012: date -s "20121230 11:00" Ask PHP to give you the year and week 52 weeks ago thanks to the code below. PHP prints "201252" instead of "201201" No problems from other dates of with another value of week. Test script: --------------- date_default_timezone_set("Your/Timezone"); // For me Europe/Paris echo date("YW",strtotime("-52 week")); Expected result: ---------------- 201201 Actual result: -------------- 201252