Duration token suffixes are holidays tokens or moon tokens or holidays response tokens to which a code representing a range of dates is appended.
Duration token suffixes are often used to list the holidays of a given month, or the entire year, and in such cases are often combined with specific holidays set token modifiers, as shown in the example below.
Structure
The structure of these suffixes is :
[aConcatToken:Period1:Period2]
Where :
•aConcatToken represents any token that can be concatenated, such as [Fa], [Fä], [:st_a], [mp], [mt].
•Periods can either be absolute or relative.
•Period1 and Period2 do not have to be of the same type (day-week-month-year). Mixing types allows for the creation of "until the end of" ranges (see examples below).
•The Period2 is optional.
If there is only one period, the beginning and end dates of the range will be determined by the beginning and end of Period1. If there are 2 periods then the beginning date of the range will come from the beginning of Period1 and the end of the range from the end of Period2.
Relative periods can be one of the following:
•d-99 to d+99.
•w-99 to w+99.
•m-99 to m+99.
•y-99 to y+99.
Absolute periods can be one of the following:
•No absolute day periods.
•w001 to w053.
•m001 to m012.
There are no absolute year periods.
Token examples
[1Fa:m001:m006] |
All holidays that fall in the first 6 months of the year (of the date of DayValue 1). |
[1Fa:m012] |
All holidays that fall in December (of the date of DayValue 1). |
[2mp:m+00:m+00] |
All moon phases that fall in the same month the date of DayValue 2. This is the same as [2mp:m+00]. |
[5Fa:d+00:m+00] |
All holidays from the current date, of DayValue 5, to the end of the current month. If we wished to do it to the end of the year we would use [5Fa:d+00:y+00]. |
[2mp:m+00:d+00] |
All moon phases since the beginning of the current month. If we wished to do it from the beginning of the year we would use [2mp:y+00:d+00]. |
Note that duration tokens can be used within zap tokens.
[8zFa:m+00=]
The above example is used to zap a byline if there is no holiday for the current month.
Finally, if you need more control over your holidays or moon phases duration tokens, then you can use instead a GenTokens token.
See also: examples of the use of duration tokens with holidays and example of the use of duration tokens with moon phases.
Topic 108499, last updated on 01-Aug-2020