#33992 [NEW]: strtotime("sunday") on last week reports wrong year

From: Date: Thu, 04 Aug 2005 03:16:08 +0000
Subject: #33992 [NEW]: strtotime("sunday") on last week reports wrong year
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82925@lists.php.net to get a copy of this message
From:             wim dot delvaux at adaptiveplanet dot com
Operating system: linux debian SID
PHP version:      4.3.11
PHP Bug Type:     Date/time related
Bug description:  strtotime("sunday") on last week reports wrong year

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  


-- 
Edit bug report at http://bugs.php.net/?id=33992&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33992&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33992&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33992&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33992&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33992&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33992&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33992&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33992&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33992&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33992&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=33992&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=33992&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33992&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33992&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33992&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33992&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33992&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33992&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33992&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33992&r=mysqlcfg


Thread (2 messages)

« previous php.bugs (#82925) next »