hebcal / hebcal-es6

perpetual Jewish Calendar with holidays, Shabbat and holiday candle lighting and havdalah times, Torah readings, and more
https://hebcal.github.io/api/core/
GNU General Public License v2.0
98 stars 14 forks source link

Is there a way to get mincha ketana 72 minutes? #447

Closed isaacfink closed 3 months ago

isaacfink commented 3 months ago

I am not sure how to calculate it but there is a mincha ketana that relies on 72 minutes, is there a way to get that in hebcal?

YizYah commented 3 months ago

Hi @isaacfink , what do you mean "relies on 72 minutes"? Do you mean Rabenu Tam LeKoola (that is, they consider shkeya to be 72 minutes after sunset).

mjradwin commented 3 months ago

There's a version of mincha ketana according to the Magen Avraham with the day starting 72 minutes before sunrise and ending 72 minutes after sunset.

https://github.com/KosherJava/zmanim/blob/master/src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java#L1973

We don't have this available in Hebcal but we could add this.

PupaRebbe commented 3 months ago

Something like this:

minchaKetanaMGA() {
  const [alot72, temporalHour] = this.getTemporalHour72();
  return new Date(alot72.getTime() + (9.5 * temporalHour));
}
isaacfink commented 3 months ago

Thanks @PupaRebbe that's what I ended up doing but I had to calculate temporal hour myself, where is this function?

isaacfink commented 3 months ago

@mjradwin That's exactly the one, I am not an expert in zmanim but I am comparing it to an existing luach, the one you linked is the one I needed and the implementation from @PupaRebbe is the correct one (at least for the couple of days I tested it for) there are some off by one issues with with rounding but it's the same implementation

PupaRebbe commented 3 months ago

Thanks @PupaRebbe that's what I ended up doing but I had to calculate temporal hour myself, where is this function?

https://github.com/hebcal/hebcal-es6/blob/b9ed641ace56dcaa246183c21de7126b5794e85a/src/zmanim.ts#L265

mjradwin commented 3 months ago

We'll get a release out within an hour. Just finishing up unit tests

mjradwin commented 3 months ago

Added to @hebcal/core 5.4.4