#24941 [Opn]: strtotime returns same date for "first wednesday" and "second Wednesday"

From: Date: Mon, 04 Aug 2003 22:31:18 +0000
Subject: #24941 [Opn]: strtotime returns same date for "first wednesday" and "second Wednesday"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-45349@lists.php.net to get a copy of this message
ID: 24941 User updated by: jpage at javeo dot com Reported By: jpage at javeo dot com Status: Open Bug Type: Date/time related Operating System: Red Hat Linux PHP Version: 4.3.1 New Comment: Typo: Actual result: both produce Aug 6 2003 Previous Comments: ------------------------------------------------------------------------ [2003-08-04 17:29:15] jpage at javeo dot com Description: ------------ strtotime() returns the same result for "first wednesday" and "second wednesday". I ran this against 'today' - Aug 4 2003, but the code below should show the error on any day. Reproduce code: --------------- $t=strtotime("Aug 3 2003"); $r=strtotime("first wednesday",$t); print(date('r',$r)); print("<br>"); $r=strtotime("second wednesday",$t); print(date('r',$r)); Expected result: ---------------- two different dates a week apart Actual result: -------------- Wed Aug for both ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24941&edit=1

« previous php.bugs (#45349) next »