|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-12-04 00:53 UTC] frozenfire@php.net
-Status: Open
+Status: Wont fix
[2011-12-04 00:53 UTC] frozenfire@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 12:00:01 2025 UTC |
Description: ------------ This is actually a nice feature for calender data/time operations, but not documented yet: Specifying a week number larger than valid for the year, the end results nicely overflows into the next year. Test script: --------------- <?php echo date( ’W’, strtotime( "December 28th, 2011" ) ), "\n"; $ndate = new DateTime(); $ndate->setISODate(2011,56,07); echo "ndate: " . $ndate->format('Y-m-d') . "\n"; $ndate->setISODate(2012,04,07); echo "ndate: " . $ndate->format('Y-m-d') . "\n"; ?> Expected result: ---------------- 52 ndate: 2012-01-29 ndate: 2012-01-29 Actual result: -------------- 52 ndate: 2012-01-29 ndate: 2012-01-29