php - strtotime returns 1970 when I remove a month? -
according php documentation, i'm using strtotime correctly, apparently i've managed wrong.
the following code:
echo date("y,n,j", strtotime($event["startdate"]));
outputs: 2013,4,18
(which correct)
whereas following code (using exact same data):
echo date("y,n,j", strtotime('-1 month', $event["startdate"]));
outputs: 1969,12,1
(instead of 2013,3,18
)
why?
echo date("y,n,j", strtotime('-1 month', strtotime($event["startdate"])));
Comments
Post a Comment