Template tag for "last month" ? *solved*
Posted: Wed Jan 08, 2020 4:49 pm
Hi
I am trying to code a small page with some statistics.
I want to show the total rainfall for "the current month" and "the last month". I.e. now it is January, so I want to show rainfall for January side-by-side with December.
How to get the number is no problem, but is it possible to get the name of the previous month through a template-tag?
[MMM] results in "Jan", so that is ok. But how to get the previous month?
(I managed to get "last year" by making a small substraction like this: {*[YYYY]-1*0} but that is just a number. Month in text is not.)
Any ideas?
I am trying to code a small page with some statistics.
I want to show the total rainfall for "the current month" and "the last month". I.e. now it is January, so I want to show rainfall for January side-by-side with December.
How to get the number is no problem, but is it possible to get the name of the previous month through a template-tag?
[MMM] results in "Jan", so that is ok. But how to get the previous month?

(I managed to get "last year" by making a small substraction like this: {*[YYYY]-1*0} but that is just a number. Month in text is not.)
Any ideas?