From:             [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:      4.2.0
PHP Bug Type:     Date/time related
Bug description:  Oct 27, 2002

<?php
// Arbitrary dates to find out a day value in int
$dayX = strtotime('Jan 2 2002') - strtotime('Jan 1 2002');
$dayY = strtotime('April 28 1999') - strtotime('April 27 1999');
if ($dayX == $dayY){
    $aDay = $dayX; //$aDay = 86400;

    $date[0] = strtotime('Oct 20 2002');
        print date("M j 'y", $date[0]);
        print '<br>';
  
    for ($i=1; $i<10; $i++){
        $date[$i] = $date[$i-1] + $aDay;
        print date("M j 'y", $date[$i]);
        print '<br>';
    }
}
?>

The code prints

Oct 20 '02
Oct 21 '02
Oct 22 '02
Oct 23 '02
Oct 24 '02
Oct 25 '02
Oct 26 '02
Oct 27 '02
Oct 27 '02
Oct 28 '02

-- 
Edit bug report at http://bugs.php.net/?id=19838&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=19838&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=19838&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=19838&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=19838&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=19838&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=19838&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=19838&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=19838&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=19838&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=19838&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19838&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=19838&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=19838&r=isapi

Reply via email to