I see there is strange problem in php with month addition and subtraction.
My questions are:
A few examples:
echo date('Y-m-d',strtotime('2011-03-31 -1 months')); //2011-03-03
echo date('Y-m-d',strtotime('2011-03-30 -1 months')); //2011-03-02
echo date('Y-m-d',strtotime('2011-03-29 -1 months')); //2011-03-01
echo date('Y-m-d',strtotime('2011-03-28 -1 months')); //2011-02-28
From your examples, it looks like it’s subtracting 1 from the month part, and then correcting for illegal dates. Your second example:
2011-03-30 - 1 month = 2011-02-30. This date does not exist, as February 2011 had only 28 days.30 - 28 = 2, so it puts it as the 2nd day of the following month.However, I have not found documentation about this.
Either way, assuming I’m right, the answer to your question is no, “1 month” does not have a (constant) equivalent in days, it depends on the input.