Test for second Monday

Does anybody have a way to test for a date like second Monday of the month or third Thursday?

Haven't played with RM yet (came over from ST and all of my rules were in webCore), but logically it should be something like

weekDay = Monday and dayOfMonth > 7 and dayOfMonth < 15

1 Like

Unfortunately there isnā€™t a day of month. Might have to cave in and use a custom app.

Like this you mean? :wink:

image

2 Likes

When you go into triggers select
Periodic Schedule
Select Monthly
Select in the week of the month
Select day of the month
Select the time

2 Likes

I was looking for a conditional. I hadnā€™t checked triggers. Iā€™ll see if I can rethink it.

Kind of roundabout but this looks like it might work.

The only issue is I want to trigger it over several days so Iā€™ll have to create a few conditionals. It only runs once a day so thatā€™s not too bad.

It ends up with two ifs for each holiday but I can live with that.

Most holidays will be a simple conditional and anything that moves will be a regular conditional like Thanksgiving. It may not be elegant but it works.

I think I looked at that some time ago. I would either have to maintain a bunch of virtual switches and read their states or update the app to write to my variable. Both seem to be more trouble.

Up until now I have just been manually updating the variable. Eventually Iā€™ll port everything over to Node-RED but that hasnā€™t happened yet so I figured I word do a quick rule.

Thanks for the suggestion.

1 Like