Google calendar events trigger base on day and month

Hi @miheso & @samliew ,

I think that it is not the good answer.
If I well understand the problem, the goal is to extract all the events from Google Calendar for a given day and month without considering the year…

The most simple solution is to extract all the events and then filter on given day and month.
Any other solution?

PBI

Did that not return results for the current day? What went wrong with it?

If you want to get all events in the same month (instead of just current day), then just expand the fields to

From first day of this month:

{{setDay(setHour(setMinute(setSecond(now; 0); 0); 0); 1)}}

To last day of this month at 23:59:59

{{addDays(setDay(setHour(setMinute(setSecond(addMonths(now; 1); 59); 59); 23); 1); -1)}}

From this example:
image
Let’s say that today is 24/04/2023, if I well understand, the goal is to retrieve the event given as example: same day, same month, but different year.

I said earlier,

Was “Single Events” set to “Yes”?

Screenshot_2023-11-22_171147

No:

Screenshot_2023-11-22_171129

Yes:

Screenshot_2023-11-22_171108


These two are the same event — Just that No (default) got the repeating original event dates set in 2021, and Yes got the event as if it wasn’t repeating (i.e.: current day).

1 Like

I received positive results from the events on the calendar. I will monitor the operations for a few days and see.

Output

Set up

data

3 Likes

Thank you @samliew @Philippe_Billet

2 Likes

@samliew can you please explain this code you used ?

{{setHour(setMinute(setSecond(now; 0); 0); 0)}}

{{setHour(setMinute(setSecond(now; 59); 59); 23)}}

@Philippe_Billet could you please help with this ?

now is the current timestamp (the day + the time).
setSecond forces the seconds to a given value, e.g., 59
setMinute forces the minutes to a given value, e.g., 59
setHour forces the hours to a given value, e.g., 26.

{{setHour(setMinute(setSecond(now; 0); 0); 0)}} forces the time to 0:00:00 in the current timestamp

and
{{setHour(setMinute(setSecond(now; 59); 59); 23)}} to 23:59:59 in the current timestamp.

If you want to go deeper, look here, it is important, time problems are not so easy to solve. A good place for testing, use a set multiple variables module and code your function in each variables, the results are immediate.

PBI

3 Likes

Thanks for writing that excellent explanation while I was away @Philippe_Billet :slight_smile:


@miheso:

If you want to learn more about Make, you can read up in the Help Center. I also recommend doing the tutorials in the Make Academy – it even has certificates for each module’s completion.

3 Likes

I actually started. Thank you

2 Likes

@Philippe_Billet Thanks for the clarification.

3 Likes