Text/Token Surrounding Holiday Name

Navigation:  ScriptLine Properties > Holidays (multiple) >

Text/Token Surrounding Holiday Name

Previous pageReturn to chapter overviewNext page

If the processing of a holiday token generates multiple holidays, then you can set text to surround each holiday occurrence the left and/or right. This text can contain Special Characters Tokens and recursive tokens (see examples).


You can also specify that if a holiday name is repeated over a period of many days, then you wish to only show it once, with different tokens depending if the range of dates is all in the same month or crosses a month or year boundary (the idea is similar to MonthHeaders). In the 3 fields that let you specify "combined" text and tokens sequences, you should use the DayValue 000 to indicate the minimum date of the multi-day holiday and you should use the DayValue 999 to indicate the maximum date of the multi-day holiday.



As a general rule you should not include a LanguageTag and/or DayValue in the tokens that you place in the Show each individual date field. Q++Studio will automatically use the LanguageTag and DayValue of the original holiday token. So, for example, if the original token was [6fa], then the use of [d] [ddd] [mmm] in the text surrounding the holiday name would be treated by Q++Studio as [a6d] [a6ddd] [a6mmm].

Note that if some of the tokens you wish to display here depend on language (such as the [ddd] and [mmm] tokens) you should use a LanguageTag in the original token, for example using [b6fa] as holiday token to ensure that the surrounding tokens get converted to [b6d] [b6ddd] [b6mmm].

If you wish to use a different language than the language of the original token (for example c instead of b) then you can, but you must include a DayValue of 1, that is to say [c1ddd] for example.

The same is true if you need to add a macro to the tokens before/after each holiday. In such cases, the DayValue 1 should be used, that is to say, the incorrect token [*2ddd] should instead be [1*2ddd], otherwise a run-time error message will be generated.

You also can use holidays tokens. However, to avoid infinite recursion (and because it seems to make sense), this text is only added to occurrences of holidays from the original token. So, for example, if you had an [5fa] token that you wished to surround to the right by [fâ], the original occurrences of [5fa] would be surrounded on the right by [fâ], but that inserted [fâ] token would not in turn be surrounded on the right by another [fâ]token.

If you wish to display a holiday symbol near each occurrence, you should use the property Holidays (display).


Any underscore character "_" (without the quotes) contained in this string will be replaced by a non-breaking space.

Topic 107088 updated on 03-May-2018.
Topic URL: https://www.qppstudio.net/webhelp_xv4/index.html?text_tokensurroundingholidayna.htm