Please enable JavaScript to view this site.


Navigation: Tokens > Month Tokens

[sMMMMDayValue2] Comparative Month Tokens

Scroll Prev Up Next More

We maintain support for this token so as not to break older scripts, but, for new scripts, you should always use MonthHeader tokens instead of the present token.


Use this token if you only wish to show monthly tokens when the month is different for 2 DayValues of the current grid.


The numbers to the left and right of the sMMMM are 2 different DayValues whose years are to be compared.

The MMMM can be replaced by any monthly token, including non-Gregorian calendar tokens such as Jewish, Islamic, Orthodox.


A common use of this token is in weekly diaries, where one wishes to show 2 months if the current spread contains a month change. Using the following tokens :


   [1Mmm] [7sMmm1]




   [1jMMMM] [7jMMMM1]


allows us to show the month of the last day of the week, only if the year changes during the week.


   Oct Nov



Use filler tokens suffixes if the current token is next to a separator such as "-" or "/" and you do not want that separator to appear when the conversion of [sMMMM] is blank.


 [1yyyy] [1MMMM][7sYYYY1\ /][7sMMMM1\ /]


The token combination above will give, for example,


2019 DECEMBER when all dates of the current spread are in the same month (and year).

2020 JANUARY FEBRUARY when there is a simple change of month.

2019 DECEMBER 2020 JANUARY when there is a change of year (and month).


See also: comparative year numbers and, more generally, conditional tokens.


Topic 166700, last updated on 17-Apr-2020