Changing a Minicalendar date with a Macro

Navigation:  Tokens > MiniCalendar Tokens >

Changing a Minicalendar date with a Macro

Previous pageReturn to chapter overviewNext page

The elements contained in a minicalendar will be based on the date of the minicalendar marker and the offset that it contains.

 

 

For example, in the grid above, if the date corresponding to DayValue 4 is March 25th, then the minicalendar at the bottom right will display the month of April because the +01 in the [4mc+01] minicalendar marker tells Q++ that the minicalendar should display the month following (+1) the month of the date corresponding to DayValue 4.

 

This notation satifies the needs of minicalendars displayed in 99% of diaries, because the month that is displayed in minicalendars usually follows that very pattern. However, suppose you need to be able to calculate the date used to base a minicalendar based on a more complex rule than "based on the date of DayValue X".

 

To do this you would place a macro token that precedes the minicalendar marker :

 

 

In the macro that you would associate with this macro token ([1*5shift_mc] in the above example) you would calculate the date on which the minicalendar should be based, and assign that date to the system variable nResult. In the Resulting Actions of the Macros Options that correspond to the *5 macros of that particular script you would then use the following settings :

 

 

This allows you to specify the most complex rules for the month to be displayed in minicalendars.


Topic 173790 updated on 07-Sep-2003.
Topic URL: http://www.qppstudio.net/webhelp/index.html?specifyingaminicalendardate.htm