Comments (2)
from homebridge-jewish-calendar.
I'm not sure the logic tracks (but will admit it got me a bit confused)
Also small detail, according to the Hebrew calendar, Iyar 5 can only occur on Monday, Wednesday, Friday or Saturday, so this simplifies it a bit.
If I understand you correctly (and also taking into account the fact the holiday starts at sundown the previous day) the correct logic will be if:
# If Iyar 5 is on Wednesday (normal)
{
Iyar 4 And Tuesday AND after sundown
or
Iyar 5 AND Wednesday AND before sundown
}
or
# If Iyar 5 is on Friday
{
Iyar 3 AND Wednesday AND after sundown
or
Iyar 4 AND Thursday AND before sundown
}
or
# If Iyar 5 is on Saturday
{
Iyar 2 AND Wednesday AND after sundown
or
Iyar 3 AND Thursday AND before sundown
}
or
# If Iyar 5 is on Monday
{
Iyar 5 AND Monday AND after sundown
or
Iyar 6 AND Tuesday AND before sundown
}
Basically for the day itself we have 4 options:
If Iyar 5 is on Thursday, all is ok
If Iyar 5 is on Friday, it will be on Iyar 4
If Iyar 5 is on Saturday, it will be on Iyar 3
If Iyar 5 is on Monday, it will be on Iyar 6
Adding the night before, after sundown, to each of these = 8 scenarios where independence day=true :)
Also, adding Yom Hazikaron sounds great
Thank you for your comment
from homebridge-jewish-calendar.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-jewish-calendar.