RE: [PHP] I have a mktime problem

2006-03-30 Thread Jim Moseby
> > > > > 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

RE: [PHP] I have a mktime problem

2006-03-30 Thread Jim Moseby
> > 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

RE: [PHP] I have a mktime problem

2006-03-30 Thread Jay Blanchard
[snip] I think this is happening because the day is being filled in by PHP as 30. Today is March 30th. Try these: echo date("d M Y", mktime(0,0,0,2)) . "\n"; //02 Mar 2006 echo date("d M Y", mktime(0,0,0,3)) . "\n"; //30 Mar 2006 PHP thinks you mean Feb 30th, which doesn't exist. So it adds 2 d

Re: [PHP] I have a mktime problem

2006-03-30 Thread Bronislav Klucka
Every missing argument is set to current value, so now you have mktime(0,0,0,2,30,2006), that is March, the 2nd. Brona Jay Blanchard wrote: 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 wh

[PHP] I have a mktime problem

2006-03-30 Thread Jay Blanchard
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