From:             
Operating system: Linux
PHP version:      5.2.17
Package:          Date/time related
Bug Type:         Bug
Bug description:strtotime ->wrong results with "first wednesday june 2011"

Description:
------------
<code>

$timestr="first wednesday june 2011";

echo date("d.m.Y",strtotime($timestr));

</code>



Then the result is the 08.06.2011, and not the 01.06.2011 as i expected.



This happens whenever the "first" should be the 01.XX.YYYY



Same thing happens with the "second","third","fourth","fifth".



Test script:
---------------
$timestr="first wednesday june 2011";

echo date("d.m.Y",strtotime($timestr));

Expected result:
----------------
01.06.2011

Actual result:
--------------
08.06.2011

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

Reply via email to