ID:               27774
 Updated by:       [EMAIL PROTECTED]
 Reported By:      eparis at plurimedia dot fr
-Status:           Open
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: Linux Debian / Solaris ... any
 PHP Version:      Irrelevant
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

march 30 - 1 month = feb 30; that doesn't exist and is the same as
march 1.


Previous Comments:
------------------------------------------------------------------------

[2004-03-30 07:14:55] eparis at plurimedia dot fr

Description:
------------
 Since today (2004-03-30), we experience a calculation error when using
strtotime("-1 month") to get previous month date. Maybe this error is
due to the fact that 2004 is a bissextile year. The last bissextile
year was 1996.

Reproduce code:
---------------
 The actual computer date must be 2004-03-30.



<?

  print strftime("%Y-%m-%d", strtotime("-1 month"))."\n";

?>

Expected result:
----------------
2004-02-29

Actual result:
--------------
2004-03-01


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27774&edit=1

Reply via email to