|
Tokens > MiniCalendar Tokens > MiniCalendar Modifiers > Minicalendar Starting Date Offset Modifier |
|
You can add an offset to a MiniCalendar Token. This is often used for one-line minicalendars, in particular if they span 2 pages. The offset is appended to the MiniCalendar token either as a relative or absolute offset.
In the samples below, the 2 top textboxes correspond to the left page and right page of a MiniCalendar using a relative offset. A relative offset is of the form :+XX or :-XX, and instructs Q++ that the first occurence of a date in the MiniCalendar (ie. the first @) shall be offset by XX days relative to the Monday which contains the first of the month (or whichever day is set in the Week Start option of the MiniCals property). Note that the standard minicalendar token [4mc+00] is a special case of a relative offset of value 0.

The 2 bottom textboxes above show absolute offsets. These are of the form :XX (no + sign), and simply instruct Q++ to start counting on the XXth of the month. Generating a script which uses the above tokens, one gets the following output :
Note again how the top left textbox corresponds to the case of a standard MiniCalendar token, and that all the MiniCalendar options, such as Show Outside Days, still work the same way (see also the section of DayHeaders in Minicalendar Options).
Although it is rare, date offsets can also be used with "normal" minicalendars (those that are not single-line). In those cases, the current week offset is most useful to shift the minicalendar a given number of weeks with respect to the current week. Using the token and modifier [mc+00:-2w] produces a minicalendar which always starts 2 weeks before the current week displaying the current week in a central position.

Note that, to obtain the above result, you need to set the option Show Outside Days of the MiniCal (current) property to true so that the dates before the month are displayed, and you must make sure that fully outside week numbers are not hidden, as is the default behaviour. The correct settings to use are :

However, you do not need to put any tokens in the shaded textbox, since, by definition, it will always remain in the same position.
See also : Number of Days Modifier, Left and Right Halves of Month Modifiers, Use Date of Markers for Embedded Tokens.
|
Topic 137600 updated on 29-Dec-05 Topic URL: http://www.qppsupport.net/webhelp/index.html?dateoffset.htm |