hello,
i have a strange problem in the gmdate function.
When i execute the following :
<? print(gmdate("M", mktime(0,0,0,1,0,2001))); ?>
it displays the Month as December, actually it should be January.
Any clues?
Thanks in advance.
Webmaster TS
i think it's getting cofused by your referring to the "0th of january", which it might be interpreting as the 31st December.
Try print(gmdate("M", mktime(0,0,0,1,1,2001)));
from the manual:
The last day of any given month can be expressed as the "0" day of the next month, not the -1 day. Both of the following examples will produce the string "The last day in Feb 2000 is: 29".