php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33993 strtotime("sunday") on last week reports wrong year
Submitted: 2005-08-04 05:16 UTC Modified: 2005-08-04 09:05 UTC
From: wim dot delvaux at adaptiveplanet dot com Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.3.11 OS: linux debian SID
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
30 + 48 = ?
Subscribe to this entry?

 
 [2005-08-04 05:16 UTC] wim dot delvaux at adaptiveplanet dot com
Description:
------------
strftime( "%A %e %B %G",$FY_FirstDayOfWeek) 
 
prints monday 26 december 2005 
 
which is correct, however 
 
strftime( "%A %e %B %G",strtotime("sunday",
$FY_FirstDayOfWeek)) 
 
prints  
 
zondag 1 januari 2005 
 
which should be 2006 no ?? 

Reproduce code:
---------------
strftime( "%A %e %B %G",$FY_FirstDayOfWeek) 
strftime( "%A %e %B %G",strtotime("sunday",$FY_FirstDayOfWeek))

and set $FY_FirstDayOfWeek to monday 26 december 2005

Expected result:
----------------
that the year 2006 is returned  


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-04 09:05 UTC] sniper@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in PHP 5.1, won't fix in PHP 4.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 12:01:31 2024 UTC