Jump to content

Program Help Needed with Climacell


macjeff

Recommended Posts

Posted

I need to calculate Easter.  Here are the rules

The simple standard definition of Easter is that it is the first Sunday after the full Moon that occurs on or after the spring equinox. If the full Moon falls on a Sunday then Easter is the next Sunday.

Timedata does month and season.  Climacell does moon phase.

** Yes I know there is a google holidays but it only flags which days are holidays- yes or no.  And the issue is other holidays fall in the same period.  So I need to know for sure if its easter.

So how can I calculate using TimeData and Climacell when Easter is.  So I know its Spring and I know its March or April.  Now how do I say (AFTER) the first full moon???

Posted

@macjeff 

1) I found an Excel formula for Easter online (assumes the Year is in A1):   =FLOOR("5/"&DAY(MINUTE(A1/38)/2+56)&"/"&A2,7)-34

I can't vouch for it, but I've checked several dates and they appear correct.

Now, you "just" need to put it into ISY math.

2 There is a HolidaysGoogle node server.  I don't use it, but Easter might be included.

3) The Timedata node server has a "Days since Unix Epoch" number.  You could brute force enter 25 variables with the next 25 Easter days and run a formula at 12:00:01am checking to see if this DsUE= one of those 25 variables.  This will keep you going until the year 2048.  The EISY might be a museum piece by then.

Good luck,

Ross

Posted
1 hour ago, Ross said:

@macjeff 

1) I found an Excel formula for Easter online (assumes the Year is in A1):   =FLOOR("5/"&DAY(MINUTE(A1/38)/2+56)&"/"&A2,7)-34

I can't vouch for it, but I've checked several dates and they appear correct.

Now, you "just" need to put it into ISY math.

2 There is a HolidaysGoogle node server.  I don't use it, but Easter might be included.

3) The Timedata node server has a "Days since Unix Epoch" number.  You could brute force enter 25 variables with the next 25 Easter days and run a formula at 12:00:01am checking to see if this DsUE= one of those 25 variables.  This will keep you going until the year 2048.  The EISY might be a museum piece by then.

Good luck,

Ross

Although I really appreciate the efforts this is too much for my math skills.  I like Michel's idea unless someone has a program they have written in the ISY they would share.

Posted

@macjeff is Easter the ONLY date you want to figure? Why not just program with specific dates? Dates through 2033...

Year	Holiday	Weekday	Date
2023	Easter	Sunday	Apr 9
2024	Easter	Sunday	Mar 31
2025	Easter	Sunday	Apr 20
2026	Easter	Sunday	Apr 5
2027	Easter	Sunday	Mar 28
2028	Easter	Sunday	Apr 16
2029	Easter	Sunday	Apr 1
2030	Easter	Sunday	Apr 21
2031	Easter	Sunday	Apr 13
2032	Easter	Sunday	Mar 28
2033	Easter	Sunday	Apr 17

uncheck "daily" and you get the yyyy/mm/dd option. Just plug those into your program(s) for Easter. 

Posted
8 minutes ago, Geddy said:

@macjeff is Easter the ONLY date you want to figure? Why not just program with specific dates? Dates through 2033...

Year	Holiday	Weekday	Date
2023	Easter	Sunday	Apr 9
2024	Easter	Sunday	Mar 31
2025	Easter	Sunday	Apr 20
2026	Easter	Sunday	Apr 5
2027	Easter	Sunday	Mar 28
2028	Easter	Sunday	Apr 16
2029	Easter	Sunday	Apr 1
2030	Easter	Sunday	Apr 21
2031	Easter	Sunday	Apr 13
2032	Easter	Sunday	Mar 28
2033	Easter	Sunday	Apr 17

uncheck "daily" and you get the yyyy/mm/dd option. Just plug those into your program(s) for Easter. 

I am sure there will be others.  Again I love Michels suggestion.

I guess I could enter all of those

Posted

It seems it would be pretty simple for a node server to achieve this, as there is a python library for holiday calculations.https://python-holidays.readthedocs.io/en/latest/  

perhaps the developer of time and date node server could add holidays.  

US Easter might be missing (seems to only have UK Easter on a Monday), but Good Friday is correct so Easter can be known that way.  Hopefully that information is out of date and US Easter is included.

Guest
This topic is now closed to further replies.

×
×
  • Create New...