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"
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to