#28594 [Bgs]: strtotime bug

From: Date: Thu, 03 Jun 2004 14:00:37 +0000
Subject: #28594 [Bgs]: strtotime bug
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-60326@lists.php.net to get a copy of this message
ID: 28594 Updated by: mgf@php.net Reported By: tavancini at hotmail dot com Status: Bogus Bug Type: Date/time related Operating System: Windows 2000 Server PHP Version: 4.3.6 New Comment: This has now become a support query, which should be directed to php-general@lists.php.net. (However, I suggest you look at mktime(), and using a day number which occurs in every month.) Previous Comments: ------------------------------------------------------------------------ [2004-06-02 18:58:54] tavancini at hotmail dot com so, this is not a bug?? if it is not, how can i make my code to function proberly? i only need to calculate the months... thanks ------------------------------------------------------------------------ [2004-06-02 17:57:25] pollita@php.net Yes... Yes, -11 month = 06-31-2003 => 07-01-2003 => 07-2003 -10 month = 07-31-2003 => 07-2003 got it? ------------------------------------------------------------------------ [2004-06-02 17:08:07] tavancini at hotmail dot com No... No, -11 month = 07-2003 -10 month = 07-2003 got it? ------------------------------------------------------------------------ [2004-06-02 11:41:12] mgf@php.net Woops, really setting Bogus. ------------------------------------------------------------------------ [2004-06-02 11:39:58] mgf@php.net H'mm, let's see, on 31-May: -11months = 31-June, which doesn't exist so is treated as 01-July -10months = 31-July (fine) -9 months = 31-August (fine) -8 months = 31-September (doesn't exist, treat as 01-Oct) -7 months = 31-October (fine) -6 months = 31-November (doesn't exist, treat as 01-Dec) etc. Not a PHP bug. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/28594 -- Edit this bug report at http://bugs.php.net/?id=28594&edit=1

« previous php.bugs (#60326) next »