Im running an older V0.19.5 Node Red instance on a PI-0-W with the Stretch version of the pi-os,
I know i should have been updating, but its been running flawlessly mostly handling mqtt for basic automation.
Its been decades since i approached the code-face for anything but a lil fun and distraction,
and re-flashing a new up to date system sd card and reconfiguring my basic set up with a later version of node red which will enable pallate updates is on the cards, but meanwhile i would like to solve this.
I needed to make a slight modification to the watering schedule for the patio tomatoes as to not drown them while growing, and i decided to water on alternative days so
Mod(ordinalDayofyear/2) is my key condition.
I was expecting to find a date object with ordinal day of year as a basic property, its not??
Im currently working with mod(day of month/2) but with a 29 or 31 day month I will get numerous double watering days per anum, now granted not too crucial when it comes to tomatoes but still, its not good enough.
I can see how to sum the current day of month with the day count of earlier months in the current year, but that seems a bit naff too
IM using the inject node timestamp as my date source. this starts the flow at a regular interval,
my function node returns the odd even day evaluation of mod(dayofmonth/2) to a switch node that passes onto a mqtt-create change node to start watering for X minutes..
Thanks in advance if you can advise..