note 94486 deleted from function.date by betz
| From: | betz@php.net | Date: | Sun, 08 Nov 2009 08:40:29 +0000 |
| Subject: | note 94486 deleted from function.date by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-162625@lists.php.net to get a copy of this message | ||
Note Submitter: superpck
----
Find whether the leap year or not with simple function, check by the last day in February is 29 or
not.
function IsLeapYear($Year)
{
$Year = ($Year >= 2300)? ($Year-543):$Year ; // if check by B.E year (Buddhist era)
return (date("d",mktime(0,0,0,3,0,$Year)) == 29)? TRUE:FALSE;
}