Re: mktime month

From: Date: Fri, 10 Mar 2006 20:37:04 +0000
Subject: Re: mktime month
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-231779@lists.php.net to get a copy of this message
Mark Steudel wrote: > Im a little confused on the number I should use for the month: > > Take the following: > > echo date('Ymd', mktime(0, 0, 0, 3, 0, date("Y")) ); > > I expected it to output: 20060331 > > But instead it outputs 20060228. Correct. You are asking it for the zeroth day of March, which is the last day of February. Regards, Ozz.

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.general (#231779) next »