KosherJava / zmanim

KosherJava Zmanim API / Library
https://kosherjava.com
GNU Lesser General Public License v2.1
107 stars 49 forks source link

check for machar_rosh_chodesh accounts for wday? #202

Closed emaayan closed 1 year ago

emaayan commented 1 year ago

i don't understand this code, cause it looks like it accounts if it's weekdays and only if it's not, it would accont for it. without this check i would check , i would get "מחר ר"ח " as the image displayed. yomtov getmacharchodesh(hdate date) { if (date.wday) { return CHOL; } if (date.day == 30 || date.day == 29) { return MACHAR_CHODESH; } return CHOL; }

image

KosherJava commented 1 year ago

@emaayan , I apologize for the long delay in replying. This method returns if the hafrorah of the week is Machar Chodesh, not if it is erev Rosh Chodesh. What you are looking for is isErevRoshChodesh().