Moving MiniCalendars according to the weekday a month starts on
Often, in a monthly grid, you may need to display minicalendars in a different position, depending of the weekday that each particular month starts on.
In the example below, two minicalendars are placed at the top left, unless the month starts on a Monday or a Tuesday. When that happens, the 2 minicalendars are moved to the bottom right of the spread.
This is accomplished by the use of zap tokens in the minicalendar tokens, as shown below left (for the top left minicalendars) and below right (for the bottom right) minicalendars.
The zap token on the left verifies if the value of the [2d] token is smaller than 3. If so, then it deletes the textbox containing the minicalendar and, because it uses an uppercase Z, it also deletes any objects grouped to the minicalendar textbox (such as lines).
In less technical terms, the textbox is deleted, if the date of the first Tuesday is either the 1st of the month or the 2nd. The zap token at the bottom right verifies the exact opposite, and therefore only one group of minicalendars is ever displayed for a given month.