note 40151 deleted from function.date by derick

From: Date: Sat, 22 May 2004 13:52:34 +0000
Subject: note 40151 deleted from function.date by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-69954@lists.php.net to get a copy of this message
Note Submitter: panania@3ringwebs.com ---- 1st and Last day of the month $monthdays = array(1=>31, 3=>31, 4=>30, 5=>31, 6=>30, 7=>31, 8=>31, 9=>30, 10=>31, 11=>30, 12=>31); $date = mktime( 0, 0, 0, date("m"), 1, date("y")); $leap = date("L", $date); // if it is a leap year set February to 29 days, otherwise 28 $monthdays[2] = ($leap ? 29 : 28); $dateStart = date("g/1/y") $dateEnd = date("g/".$monthdays[date("g")]."/y") Hope it saves you time, Peter

« previous php.notes (#69954) next »