From:             shokarta at gmail dot com
Operating system: WinXP SP2/AppServ2.5.9
PHP version:      5.2SVN-2009-10-24 (snap)
PHP Bug Type:     Date/time related
Bug description:  strtotime work on sunday as a first day of week

Description:
------------
Got a timestamp for sunday 1319281200 (its Sunday 23.10.2011), date("W") 
says its 42nd week of the year.

if i do strtotime("this monday",1319281200) then it will return: 
1319367600 which is monday 24.10.2011 and date("W") says its 43rd week 
on that year..

so simply strtotime works that sunday is a first day in a week instead 
of date which makes monday as a first day...

can i configure strtotime to work on monday as a first day as well?

Reproduce code:
---------------
strtotime("this monday",1319281200);

Expected result:
----------------
1318762800 (week 42, monday, 17/10/2011)

Actual result:
--------------
1319367600 (week 43, sunday, 24/10/2011)

-- 
Edit bug report at http://bugs.php.net/?id=49981&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49981&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49981&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49981&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49981&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49981&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49981&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49981&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49981&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49981&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49981&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49981&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49981&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49981&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49981&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49981&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49981&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49981&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49981&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49981&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49981&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49981&r=mysqlcfg

Reply via email to