#23428 [NEW]: a Example 3. date() and mktime() example , bug
| From: | noam at i-com-it dot com | Date: | Wed, 30 Apr 2003 14:14:13 +0000 |
| Subject: | #23428 [NEW]: a Example 3. date() and mktime() example , bug | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969352973@lists.php.net to get a copy of this message | ||
From: noam at i-com-it dot com
Operating system: redhat 7.2
PHP version: 4.3.1
PHP Bug Type: Documentation problem
Bug description: a Example 3. date() and mktime() example , bug
in the date function
(http://www.php.net/manual/en/function.date.php)
Example 3. date() and mktime() example
$lastmonth = mktime (0,0,0,date("m")-1,date("d"),date("Y"));
i use it in the 31.4
like this:
$month= mktime (0,0,0,date("m")-2,date("d"),date("Y"));
i got "march";
because february only have 28 days .
i use:
$month= mktime (0,0,0,date("m")-2,1,date("Y"));
instead;
noam
--
Edit bug report at http://bugs.php.net/?id=23428&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23428&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23428&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23428&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23428&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23428&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23428&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23428&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23428&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23428&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23428&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23428&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23428&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23428&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23428&r=gnused