I fire up my christmas lighting in the morning and in the evening for some time and not during daylight. This works nicely with node-red-contrib-light-scheduler.
However all this should happen only starting Advent Sunday (this year: 29-NOV) and finish on 06-JAN.
I want to write a function returning either true/false or providing two exits.
- How do I determine if the current day is after 06-JAN ?
- How do I determine the day of Advent Sunday (rule: First Sunday after 26-NOV (27 -NOV ... 03-DEC) ???
- How do I get the current year I am in?
I guess that if I can answer 1 then I can answer if I am currently after Advent Sunday.
Any help appreciated! Thanks, Uwe