<?php

// check last day of september
$month = '08';
$year = date("Y");

$last_day = date("t", mktime (0,0,0, $month,1,$year));

print $last_day;
?>

-----Original Message-----
From: Scott Fletcher [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 12:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Validate The Last Day of Month with server's clock????

Hi!

    Here's a trick script.  We know that some months have the last day
which
is 30 while other is 31.  As for February, it can be either 28 or 29.
So,
what's the trick in using the php to find out what is the last day of
the
month if you want to checked it against the server's clock to find out
the
last day of the month.  Suppose it is this month or 3 months ago or 3
months
from now.  Anyone know?

Thanks!



-- 
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

Reply via email to