RE: I have a mktime problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> > 
> > I'm having an weird issues with the date and mktime function thing
> > getting unexpected results, and I was wondering if y'all 
> > could help clue
> > me in as to what is wrong.
> > Here's the code I'm running:
> >         echo date(M, mktime(0,0,0,2)) . "\n"; Where the 2 is 
> > the month.
> > Now when I put in the number 1 in the month slot I get Jan 
> > When I put in
> > 3 I get Mar When I put in 4 I get Apr Etc.
> > However, when I put in 2 I get Mar and not Feb.
> > 
> > What's up with that? What am I doing wrong here? Should I get some
> > sleep?
> > 
> 
> 
> It seems to have something to do with the fact that Feb has 
> only 28 or 29
> days, and today is the 30th.
> 
> echo date(M, mktime(0,0,0,2,28)) . "\n";
> 
> It will return "Mar".
> 
> JM

Whoops, "Feb" I meant to say.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux