Re: Bug with mktime??

From: Date: Mon, 30 Aug 2004 23:53:25 +0000
Subject: Re: Bug with mktime??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-195228@lists.php.net to get a copy of this message
On Tuesday 31 August 2004 05:53, John Clegg wrote: > I have been using mktime() to determine the next 12 months for a > program, and i have discovered what seems a bug in the function. > > The following code... > > <?php > for($i=0;$i < 12;$i++){ > > $currentDate = date("d m Y",mktime(0, 0, 0,date("m")+$i , > date("d"), Try using date('n'). Leading zeros are interpreted in octal. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* You don't have to be nice to people on the way up if you're not planning on coming back down. -- Oliver Warbucks, "Annie" */

« previous php.general (#195228) next »