Re: Date Issue

From: Date: Mon, 31 Mar 2008 19:16:44 +0000
Subject: Re: Date Issue
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-272347@lists.php.net to get a copy of this message
On Mon, Mar 31, 2008 at 3:07 PM, <admin@buskirkgraphics.com> wrote: > Not understanding why this is happening. > > $month = date("F", mktime(0,0,0, date(m), date(d), date(Y))); > $zomonth = date("F", mktime(0,0,0, date(m)-1, date(d), date(Y))); > > echoing out the exact same month > March > March > > Checked server timezone/date/time all is good. Am I half asleep at the wheel on this one and > just not seeing my mistake here? mktime "will automatically calculate the correct value for out-of-range input." The "31st day of February in 2008" is March 2nd, so both dates are in March. Andrew

« previous php.general (#272347) next »