Re: Validate The Last Day of Month with server's clock????

From: Date: Wed, 13 Aug 2003 19:36:50 +0000
Subject: Re: Validate The Last Day of Month with server's clock????
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-159480@lists.php.net to get a copy of this message
From: "Nicholas Robinson" <npr@bottlehall.freeserve.co.uk> > The 'usual' trick is to set the date to the first day of the month after the > one you want and then subtract one day. Along those same lines, this works: <?php $month = 12; $year = 2003; $last_day_of_month = mktime(12,0,0,$month+1,0,$year); echo date('m/d/Y',$last_day_of_month); ?> ---John Holmes...

« previous php.general (#159480) next »