This is a known bug/feature with the strtotime() PHP function:
https://derickrethans.nl/obtaining-the-next-month-in-php.html
http://php.net/manual/en/function.strtotime.php#107331 (and next)
There are some hints for solutions on these pages, but unfortunately the
PHP version on pmwiki.org is a little old and does not support them.
The following work as expected in PHP 5.5, PHP 5.6 and PHP 7:
* {(ftime fmt="%b" when="first day of last month -2months")}
* {(ftime fmt="%b" when="first day of last month -1month")}
* {(ftime fmt="%b" when="first day of last month")}
* {(ftime fmt="%b %Y")}
* {(ftime fmt="%b" when="first day of next month")}
* {(ftime fmt="%b" when="first day of next month +1month")}
* {(ftime fmt="%b" when="first day of next month +2months")}
Petko
---
Change log : http://www.pmwiki.org/wiki/PmWiki/ChangeLog
Release notes : http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes
If you upgrade : http://www.pmwiki.org/wiki/PmWiki/Upgrades
On 2016-08-31 13:36, [email protected] wrote:
On the 31st of August (possibly on every 31st or perhaps on every last
day of a month, I am not sure) there is an odd result to this markup
* {(ftime fmt="%b" "-2 month")}
* {(ftime fmt="%b" "-1 month")}
* {(ftime fmt="%b %Y")}
* {(ftime fmt="%b" "+1 month")}
* {(ftime fmt="%b" "+2 month")}
* {(ftime fmt="%b" "+3 month")}
resulting in something like:
* Jul
* Jul
* Aug 2016
* Oct
* Oct
* Dec
I just tested and documented in
http://www.pmwiki.org/wiki/PmWiki/MarkupExpressions-Talk
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users