note 89890 added to function.checkdate
| From: | rfeugenio at gmail dot com | Date: | Fri, 27 Mar 2009 06:21:19 +0000 |
| Subject: | note 89890 added to function.checkdate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152513@lists.php.net to get a copy of this message | ||
<?php
// This is a simple function that will get the last day of the month.
function GetLastDayofMonth($year, $month) {
for ($day=31; $day>=28; $day--) {
if (checkdate($month, $day, $year)) {
return $day;
}
}
}
?>
----
Server IP: 61.195.146.164
Probable Submitter: 221.186.135.73
----
Manual Page -- http://www.php.net/manual/en/function.checkdate.php
Edit -- https://master.php.net/note/edit/89890
Del: integrated -- https://master.php.net/note/delete/89890/integrated
Del: useless -- https://master.php.net/note/delete/89890/useless
Del: bad code -- https://master.php.net/note/delete/89890/bad+code
Del: spam -- https://master.php.net/note/delete/89890/spam
Del: non-english -- https://master.php.net/note/delete/89890/non-english
Del: in docs -- https://master.php.net/note/delete/89890/in+docs
Del: other reasons-- https://master.php.net/note/delete/89890
Reject -- https://master.php.net/note/reject/89890
Search -- https://master.php.net/manage/user-notes.php