note 39044 added to function.checkdate
| From: | alex at urbi dot com dot br | Date: | Thu, 15 Jan 2004 12:16:55 +0000 |
| Subject: | note 39044 added to function.checkdate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63600@lists.php.net to get a copy of this message | ||
You can use this function to check if a year is leap or not:
if (chkdate(2,29,$current_year)) {
echo "$current_year is a leap year !<br>\n";
} else {
echo "$current_year is NOT a leap year !<br>\n";
}
It's straightforward... :)
----
Manual Page -- http://www.php.net/manual/en/function.checkdate.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39044
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39044&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39044&report=yes
Search -- http://master.php.net/manage/user-notes.php