note 12272 deleted from function.mktime by hholzgra
| From: | hholzgra@php.net | Date: | Sun, 14 Apr 2002 22:12:29 +0000 |
| Subject: | note 12272 deleted from function.mktime by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-29330@lists.php.net to get a copy of this message | ||
to clarify the previous comments about the year 2000 and 2100 being leap years .. it seems that none
of you have bothered to check:
2000 is a leap year but 2100 is NOT.
why is this ? this elusive rule which you seek is as follows:
$leap_year = (!(($year % 100) ? ($year % 4) : ($year % 400)));
that is, the year is divisible by 4 AND (the year is NOT divisible by 100 UNLESS it is also divisble
by 400)
i thought that everyone knew this .. ;)