note 94485 deleted from function.date by derick
| From: | derick@php.net | Date: | Sun, 15 Aug 2010 18:42:38 +0000 |
| Subject: | note 94485 deleted from function.date by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-171711@lists.php.net to get a copy of this message | ||
Note Submitter: superpck at yahoo dot com
----
Find whether the leap year or not with simple function, check by the last day in February is 29 or
not.
<?php
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;
}
?>