Please enable JavaScript to view this site.

 

Navigation: Tokens > MiniCalendar Tokens

Changing a Minicalendar date with a Macro

Scroll Prev Up Next More
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 on the right, if the date corresponding to DayValue 4 is March 25th, then the minicalendar on the right will display the month of April because the +01 in the [4mc+01] minicalendar marker tells Q++Studio that the minicalendar should display the month following (+1) the month of the date corresponding to DayValue 4.

 

This notation satisfies 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, as shown below.

 

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.

 

Then, 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 shown on the right.

 

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

 


Topic 173790, last updated on 06-Sep-2022