note 94150 deleted from function.date by danbrown

From: Date: Mon, 19 Oct 2009 22:04:17 +0000
Subject: note 94150 deleted from function.date by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161882@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- re: dev at omikrosys dot com <?php function leapYear($year) { return (date('L', mktime(0, 0, 0, 1, 1, $year)) == 1); } function daysInMonth($month = 0, $year = '') { $months = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"); if (!is_numeric($year) || strlen($year) != 4) { $year = date('Y'); } if (!is_numeric($month)) { $month = in_array($month, $months) ? (array_search($month, $months) + 1) : false; } return $month ? date('t', mktime(0, 0, 0, $month, 1, $year)) : 0; } ?>

« previous php.notes (#161882) next »