note 17457 deleted from function.mktime by jimw
| From: | jimw@php.net | Date: | Thu, 20 Dec 2001 23:08:19 +0000 |
| Subject: | note 17457 deleted from function.mktime by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23535@lists.php.net to get a copy of this message | ||
An amendment to my post above:
I ran the function through a for loop, increasing the year each time. Half the years the output is
accurate. %25 of the years the output is a day ahead, and 25% of the time it is a day late. Here is
the script I ran:
for($i=1990; $i<2006; ++$i)
{
$lastday = mktime (0,0,0,12,0,$i);
echo strftime ("Last day in Nov, $i is: %m %d", $lastday);
}
And here is my output:
Last day in Nov, 1990 is: 11 30
Last day in Nov, 1991 is: 11 30
Last day in Nov, 1992 is: 11 29
Last day in Nov, 1993 is: 12 01
Last day in Nov, 1994 is: 11 30
Last day in Nov, 1995 is: 11 30
Last day in Nov, 1996 is: 11 29
Last day in Nov, 1997 is: 12 01
Last day in Nov, 1998 is: 11 30
Last day in Nov, 1999 is: 11 30
Last day in Nov, 2000 is: 11 29
Last day in Nov, 2001 is: 12 01
Last day in Nov, 2002 is: 11 30
Last day in Nov, 2003 is: 11 30
Last day in Nov, 2004 is: 11 29
Last day in Nov, 2005 is: 12 01
Can anybody tell me what could possibly be causing this?