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:



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


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.

Don't know wether or not this might be helpful, but personally I'm using the Holiday Switcher by @dman2306 and then the app controls a virtual switch. This is used by me in several ways, for instance prevent weekday apps to run during holidays. But naturally it can be used the other way around, as a condition for lighting during the whatever season. One good thing is that you can define custom holidays, for instance birthdays etc.

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