Last modified: 2013-09-15 16:53:59 UTC
Created attachment 12432 [details] The function {{#time:F|-1 months}} returns current month's name in place of previous month. Please see the screenshot. The function {{#time:F|-1 months}} returns current month's name in place of previous month.
The screenshot was taken from English Wikipedia.
I'm not sure this is a bug: "May 31 - 1 months" is "April 31", which is "May 1". Just some examples (with format c, to show the whole date): {{#time:c}} = 2013-05-31T09:24:00+00:00 {{#time:c|-1 months}} = 2013-05-01T09:24:00+00:00 {{#time:c|-2 months}} = 2013-03-31T09:24:00+00:00 {{#time:c|-3 months}} = 2013-03-03T09:24:00+00:00 So {{#time:F|-1 months}} = May is strange, but consistent.
http://www.gnu.org/software/tar/manual/html_node/Relative-items-in-date-strings.html#SEC125: "The fuzz in units can cause problems with relative items. For example, ‘2003-07-31 -1 month’ might evaluate to 2003-07-01, because 2003-06-31 is an invalid date. To determine the previous month more reliably, you can ask for the month before the 15th of the current month."
Maybe {{#time:F|2000-{{#expr:{{#time:m}}-1}}-1}}?
Lowering the priority to minor. If it is not at all a bug, it may please be closed.
I don't think this is fixable – as Michael explained, it's a quirky, but expected behavior. Closing.