note 94485 added to function.date
| From: | superpck at yahoo dot com | Date: | Sun, 08 Nov 2009 05:53:00 +0000 |
| Subject: | note 94485 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-162623@lists.php.net to get a copy of this message | ||
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;
}
----
Server IP: 69.147.83.197
Probable Submitter: 118.173.244.182
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/94485
Del: integrated -- https://master.php.net/note/delete/94485/integrated
Del: useless -- https://master.php.net/note/delete/94485/useless
Del: bad code -- https://master.php.net/note/delete/94485/bad+code
Del: spam -- https://master.php.net/note/delete/94485/spam
Del: non-english -- https://master.php.net/note/delete/94485/non-english
Del: in docs -- https://master.php.net/note/delete/94485/in+docs
Del: other reasons-- https://master.php.net/note/delete/94485
Reject -- https://master.php.net/note/reject/94485
Search -- https://master.php.net/manage/user-notes.php