-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about Yom Tov #240
Comments
@tom42530 ,
Please let me know if there is anything else that I can help clarify. |
Ok thanks for the clarification. here's my working method. boolean isYomTov() {
Calendar lCalendarTomorrow = Calendar.getInstance();
lCalendarTomorrow.setTimeInMillis(getNow().getTimeInMillis());
lCalendarTomorrow.add(Calendar.DATE, 1);
if (isWorkProhibed(getNow()) && isWorkProhibed(lCalendarTomorrow)) {
return true;
} else if (isWorkProhibed(lCalendarTomorrow)) {
final long lNowMs = getNow().getTimeInMillis();
return lNowMs >= DateUtils.ceiling(buildComplexZmanimCalendar(getNow()).getCandleLighting(), Calendar.MINUTE).getTime();
} else if (isWorkProhibed(getNow())) {
final long lNowMs = getNow().getTimeInMillis();
return lNowMs < DateUtils.ceiling(buildComplexZmanimCalendar(getNow()).getTzaisGeonim8Point5Degrees(), Calendar.MINUTE).getTime();
} else {
return false;
}
}
private boolean isWorkProhibed(Calendar aCalendar) {
JewishCalendar lJewishCalendar = new JewishCalendar(aCalendar);
return lJewishCalendar.isYomTov() && lJewishCalendar.isAssurBemelacha();
} Feel free to send me remarks if nomething wrong. Thanks for your work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I try to get Yom Tov start to end time but i don't how to get it.
For now i 'm able to know if current date is yomTov with
new JewishCalendar(lCalendar).isYomTov();
For example Rosh Hashana 2024 in Paris, i need have start time wednesday 2 october 19h09 and end time friday 4 octobre 20h10
Thanks in advance
The text was updated successfully, but these errors were encountered: