PHP strtotime( YYYY-mm last day) a month off error
Posted
by Kami
on Stack Overflow
See other posts from Stack Overflow
or by Kami
Published on 2010-03-24T18:27:09Z
Indexed on
2010/03/24
18:33 UTC
Read the original article
Hit count: 372
I'm trying the following command in PHP 5.2.12 :
print (date('Y-m-d', strtotime('2009-12 last day')));
Regarding to the php.net manual :
date('m/d/y', strtotime('2009-03 last day')); # 03/31/09
it should display the last day of march 2009 (2009-03-31) !
Mine returns the last day of the previous month ? why ? :
2009-11-30
© Stack Overflow or respective owner