Check ongoing calendar event

Hi,

Let's say I have an event in Google calendar occurring several days in a row, like holidays for example. It starts the 22 of December and stops the 3rd of January.
I'm on the 26 of December : how do I check the 27th is part of the holiday?

(The trigger "start of event" doesn't work as the event started several days before.)

Thank you!
 

MacroDroidDev

Administrator
Staff member
As @Qarboz says you can make use of variables to keep track of things.

For example when the calendar event starts the first time you can set a variable with a timestamp and then next time it triggers check the difference between the current system time and the previously stored value. If it's within a certain threshold you can assume its part of the same holiday.
 

Qarboz

Well-known member
As @Qarboz says you can make use of variables to keep track of things.

For example when the calendar event starts the first time you can set a variable with a timestamp and then next time it triggers check the difference between the current system time and the previously stored value. If it's within a certain threshold you can assume its part of the same holiday.
I would do something simpler ;)
With the calendar event starts trigger (contains "holiday"), I set a global bool variable (e.g. "InHoliday") to true. With the calendar event ends trigger (contains "holiday") set the variable to false.
This in a dedicated macro.
Then I use the variable InHoliday (read-only!) in the macros where I need to
 
Last edited:
Top