Re: LAST DAY OF MONTH
| From: | Justin French | Date: | Fri, 15 Aug 2003 09:32:50 +0000 |
| Subject: | Re: LAST DAY OF MONTH | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159660@lists.php.net to get a copy of this message | ||
I *think* if you feed it the unix timestamp for the 1st day of the month, it will give you the last day, *untested* though.
<?
$firstDay = strtotime('2003-05-01');
$lastDay = date('t',$firstDay);
?>
Justin
On Friday, August 15, 2003, at 06:40 PM, Ralph Guzman wrote:
I just noticed, this will give me total days for current month. But let's say I want to look up the total days for another month? -----Original Message----- From: Sn!per [mailto:sniper@home.net.my] Sent: Friday, August 15, 2003 1:21 AM To: Ralph Guzman Cc: PHP General Mailing List Subject: Re: [PHP] LAST DAY OF MONTH <? print date("t") ?> rgds. Quoting Ralph Guzman <ralph@nqionline.com>:How can I get the last day for the current month? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php--------------------------------------------------- Sign Up for free Email at http://ureg.home.net.my/ --------------------------------------------------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- [This E-mail scanned for viruses]