KosherJava Zmanim Library 3.0.0 Released


The KosherJava Zmanim API version 3.0.0 was released on Oct 21, 2026 י׳ חשון תשפ״ז in Maven and GitHub.

This is a major release, and unlike the releases that came before it, it will break existing code. The API has moved to java.time, a number of classes and methods were renamed, and the methods that had been deprecated over the years were removed. The zmanim themselves are almost all unchanged; what changed is what they are called and what type they return. Allow some time for the upgrade, and see the full list of changes since the 2.5.0 release in GitHub.

New in Version 3.0.0

Two New Calculators

  • The MeeusCalculator implements Jean Meeus’s high-accuracy algorithm. The existing NOAACalculator, which remains the default, is based on NOAA‘s implementation of his low-accuracy algorithm.
  • The SPACalculator implements the Solar Position Algorithm. Both new calculators are more accurate and slower than the NOAA calculator, though for practical zmanim the difference is a matter of seconds.
  • The USNO-based SunTimesCalculator is now deprecated. It is less accurate than the other three and is only being kept for reference and comparison with older implementations.

Breaking Changes

  • The minimum supported JRE is now Java 11, up from Java 8. Note that the JavaDocs only generate properly under Java 21. This affects generating the documentation, not the compiled code, which continues to target Java 11.
  • The API uses java.time throughout. All zmanim return Instants rather than Dates, sha’os zmaniyos return a Duration (and null rather than Long.MIN_VALUE when not applicable), Calendar and GregorianCalendar gave way to LocalDate and ZonedDateTime, TimeZone to ZoneId, and SimpleDateFormat to DateTimeFormatter. The now obsolete com.kosherjava.util.Time class was removed.
  • The confusingly named ComplexZmanimCalendar is now the ComprehensiveZmanimCalendar.
  • Generically named methods in the ZmanimCalendar were renamed to say which opinion they calculate. The zmanim did not change, only the names: getTzais() is now getTzaisGeonim8Point5Degrees(), getAlosHashachar() is getAlos16Point1Degrees(), getSofZmanShmaMGA() is getSofZmanShmaMGA72Minutes(), and getMinchaGedola(), getMinchaKetana() and getPlagHamincha() gained a GRA suffix. Minute-based zmanim now spell out Minutes, and getChatzos() is getChatzosHayom().
  • Parsha was renamed Parshah, in the formatters as well, and the misspelled isAssurBemlacha() and getBainHasmashos() methods were corrected.
  • Deprecated methods flagged for removal are gone, among them getSofZmanShmaKolEliyahu(), the fixed local chatzos based zmanim, and the JewishCalendar tefila methods that moved to TefilaRules. The redundant GeoLocationUtils class was removed in favor of GeoLocation.
  • A few zmanim that were a drop too early were corrected. getTzaisGeonim4Point37Degrees() is now getTzaisGeonim4Point42Degrees() and getTzaisGeonim4Point61Degrees() is getTzaisGeonim4Point66Degrees(). getTzaisGeonim5Point88Degrees() was removed.
  • The getSofZman*Chametz* methods return null when it is not Erev Pesach.
  • The source is now UTF-8, so the Hebrew in the documentation and code (particularly in HebrewDateFormatter) appears properly.

Chatzos

  • getChatzosHalayla() was added, calculated as astronomical midnight rather than as halfway between sunset and sunrise or twelve hours after chatzos hayom.
  • Two settings control how chatzos is used: useAstronomicalChatzos (on by default, retaining the backwards compatibility break introduced in 2.5.0) and useAstronomicalChatzosForOtherZmanim (off by default). getChatzosAsHalfDay() returns half-day chatzos regardless of the setting.
  • The generic getHalfDayBasedZman(startOfHalfDay, endOfHalfDay, hours) replaces getFixedLocalChatzosBasedZmanim() and allows other zmanim to be based on chatzos, and getPercentOfShaahZmanisFromDegrees(degrees, sunset) simplifies percentage-of-the-day calculations.

The Sun’s Position, and the Arctic

  • Solar azimuth and elevation were fixed in the NOAACalculator, and getSolarAzimuth(Instant, GeoLocation) and getSolarElevation(Instant, GeoLocation) were added to the AstronomicalCalculator, along with getTimeAtAzimuth(azimuth) in the AstronomicalCalendar.
  • The sun’s apparent angular semi-diameter for the day is now used by default rather than a fixed radius.
  • getPolarPlagHaminchaBenIshChai() and getPolarStartOfDayTeshuvosVehanhagos() were added for latitudes where the sun does not cross the horizon, together with getSunriseOrEasternmostSolarAzimuth() and getSunsetOrWesternmostSolarAzimuth().
  • The USNO noon calculation was corrected in locations where it was sometimes twelve hours off, and getInstantFromTime() was tweaked to address issues near the dateline.

The Calendar Classes

  • JewishCalendar gained getTekufa() and getTekufaAsInstant() for the tekufos, plus and minus methods for years, months and days matching LocalDate, and a public isJewishLeapYear(int). isHavdalahRecited() was renamed isTonightMutarBemelacha(), isYomTov() now returns true for 20 Nissan, and getDaysInJewishMonth() and getLastDayOfGregorianMonth() take their parameters in year, month order.
  • HebrewDateFormatter gained formatParsha(Parshah), and getHebrewMonthList() / setHebrewMonthList(String[]), which allow overriding the default month names such as Cheshvan to Marcheshvan.
  • TefilaRules gained isMizmorLesodaRecited(), and no longer has Tachanun recited on Erev Rosh Hashana.
  • ComprehensiveZmanimCalendar gained getMisheyakir12Point85Degrees(), getSofZmanAchilasChametzMGA72MinutesZmanis() and getSofZmanBiurChametzMGA72MinutesZmanis(), and a getMinchaGedolaGreaterThan30(Instant) that works with any mincha gedola calculation.

A number of other small changes, null-handling corrections and bug fixes are in the full list of changes. I would like to thank Moshe Dicker, Elyahu Jacobi and Maor Na’im of RoyZmanim, and many others who helped with code that went into this release. I would also like to thank Eli Julian for his continued release support skills.

KosherJava Zmanim API 2.5.0 Released


The KosherJava Zmanim API version 2.5.0 was released on June 9, 2023 י״ג סיון תשפ״ג in Maven and GitHub.

New in Version 2.5.0

See the full list of changes between v2.4.0 and v2.5.0 in GitHub. I would like to thank Eli Julian for his continued release support skills.

KosherJava Powers Zmanim on El Al Flights


In an earlier Inflight Zmanim Calculations – Why So Complex? post, I outlined the complexity of calculating zmanim for flights. Back in Aug 2022, Dan’s Deals posted the exciting news that Zmanim were added to El Al’s flight entertainment system. This had not been formally announced by El Al at the time since the app was really in an (unannounced) alpha/beta testing phase. A careful examination of the screenshots by members of the #zmanim channel in the Frum Software Developers Slack, showed that it was powered by the KosherJava zmanim library. It should not have been surprising that it was found and used without my knowledge, since it is a free, well documented and easy to use open source library. After a number of issues with the zmanim app were reported to me (I want to thank all of those who took the time to track me down to report the issues), Rabbi Dovid Heber reached out to El Al, and Tal Kalderon, the head of El Al’s Inflight entertainment & Connectivity team reached out to me for assistance. This lead to meetings with Boris Veksler the CEO of FlightPath3D who integrated the KosherJava zmanim code into their flight maps as an optional module that El Al is using.

The FlightPath3D in-flight mapping app on El Al with the zmanim app Magen Dovid icon on the bottom left
Boris made it a personal mission to perfect the product and a series of fixes were deployed until the final release of the Prayer Room / Mesivta Derakia app was deployed on El Al aircraft on 5 Feb, 2023. At this point, the app started displaying accurate zmanim. Boris and the FlightPath3D team put a lot of effort into perfecting it into an easy-to-use app. To ease understanding of zmanim on flights that cross time zones, the app shows countdown times to the upcoming zmanim.
The El Al Zmanim app showing the default current aircraft location zmanim
For example, El Al flight LY 26 from New York to Israel departing at 9pm will show a countdown to chatzos/midnight, alos hashachar (two variants) and later zmanim (such as misheyakir, sunrise, etc.), displaying a countdown, with the number of hours and minutes to upcoming zmanim. Zmanim are calculated based on the plane’s current location, speed and the flight path. Since headwinds and tailwinds (as well as in-flight route changes) can significantly change the time that zmanim will be reached, the times to the upcoming zmanim are recalculated multiple times a minute. This significantly reduces the challenge to passengers, since precalculated zmanim do not come close to real time calculations on the flight. The app also shows a compass with the bearing to Yerushalayim / Jerusalem (map). The FAQ that is part of the zmanim app on the aircraft appears in a hyperlinked version at El Al In-Flight Zmanim FAQ on this site. The app defaults to the Aircraft location but can be changed to show zmanim for multiple international cities
The El Al zmanim app displaying zmanim for New York
, displayed in the time and time zone of those cities. The app works in both English and Hebrew, based on the language selected in the flight entertainment system. A thank you goes to R’ Chaim Keller of the indispensable Chai Tables project for allowing the development team access his flight path algorithms. The FAQ would not have been possible without help of translators and copy-editors.
The El Al Zmanim app in Hebrew
A special thanks to Effie Freiner from Lakewood for the Hebrew translation (the “Yeshivish” Hebrew posed its own set of challenges), and to my wife and Dovid Nachfolger for clarifying the language and grammar in the English FAQ.
I spent time with Rabbi Dovid Heber, Rabbi Dovid Braunfeld, Rabbi Yisroel Harfenes and Reb Solly Tropper reviewing the various complexities of calculating in-flight zmanim before the app left the βeta stage and went live.

Developing Software for Aircraft

Developing apps for use on an airliner has a series of challenges, in particular for in-flight entertainment (IFE) systems. It is a complex process that requires a deep understanding of the aviation industry and the systems onboard the aircraft.

First, the hardware hosting the apps goes through stringent safety certifications and has to pass a series of requirements. These include being isolated from any cabin and aircraft controls. The most they can do is access the flight management system (FMS) in read-only mode, with no ability to push data to the FMS. These certifications are done for each aircraft configuration and can take a year or more to complete.

Software and the associated apps also follow similar certification processes. The software must be designed to work seamlessly with any IFE systems already in place on the aircraft. Thus, it has to adapt to new and older hardware and operating systems and understand and adapt to idiosyncrasies in the data provided by the FMS. FlightPath3D is a leading provider of interactive mapping software for IFE systems. This type of software provides passengers with real-time information about their flight’s location, altitude, and speed, as well as other relevant data such as the estimated time of arrival and the distance to the destination. This made FlightPath3D a natural vendor for the zmanim work. FlightPath3D has a wealth of experience in developing high-quality software solutions that meet the needs of airlines and passengers and adapt to the particular hardware installed onboard.

לז״נ אבי מורי הרב יצחק אריה בן ר׳ ברוך הירשפלד ז״ל. נפ׳ י׳ אדר ב׳ תשפ״ב.
In memory of my father R’ Yitzchok Hershfeld (Montreal).

לז״נ חמי ר׳ שרגא פייבל בן ר׳ שלמה יהודה מילר ז״ל. נפ׳ ט״ו אייר תשפ״ג.
In memory of my father-in-law R’ Feivel Muller (Brooklyn / Lakewood).

Zmanim API 2.4.0 Released


The KosherJava Zmanim API version 2.4.0 was released on Nov 27, 2022 ד׳ כסלו תשפ״ג in Maven and GitHub.

New in Version 2.4.0

Tefila Rules Added to KosherJava Zmanim Library

Kosel Picture 1932
Davening at the Kosel. This picture was taken by my grandfather Sidney (Nesanel) Siegfried on Aug 1, 1932 כ״ח תמוז תרצ״ב. This article was posted exactly 90 years to the day (Gregorian date) after the picture was taken.
The new TefilaRules class has been added to the KosherJava Zmanim Library. This will be included in the upcoming v2.4.0 release. The TefilaRules class was added in an effort to help zmanim calendar authors who sometimes require knowing if תחנון tachanun is recited on a specific day in order to set tefila times (such as mincha starting X minutes before shkiah, and a few minutes later if tachanun is not recited). It is also useful for siddur app creators. With many different minhagim (mostly chasidishe) about when tachanun is recited, the class currently supports 12 different options that can allow setting the rules for a majority of minhagim.
Yahrzeits such as 7 Adar, (Moshe Rabbeinu’s yahrzeit) or holidays celebrated by specific communities such as Purim Mezhbizh (Medzhybizh) celebrated on 11 Teves or Purim Saragossa celebrated on the 17th of Shevat (the Wikipedia date seems to be in error), are not (and likely never will be) supported by this class.
Other tefila related rules such as the existing Mashiv Haruach etc. rules were moved over from the JewishCalendar class to this new class where they have a more natural fit. The methods that were migrated over, were deprecated in the JewishCalendar class and will be removed in v3.0.0.

Key Methods in the TefilaRules Class

The following are the key methods in the new TefilaRules class.

Sample Code

TefilaRules tr = new TefilaRules();
JewishCalendar jCal = new JewishCalendar();
HebrewDateFormatter hdf = new HebrewDateFormatter();
hdf.setHebrewFormat(true); // Hebrew formatting
jCal.setJewishDate(5783, JewishDate.TISHREI, 1); // Rosh Hashana
System.out.println(hdf.format(jCal) + " - Is tachanun recited: " + tr.isTachanunRecitedShacharis(jCal));
jCal.setJewishDate(5729, JewishDate.SHEVAT, 21);
System.out.println(hdf.format(jCal) + " - is mashiv haruch recited: " + tr.isMashivHaruachRecited(jCal));
jCal.setJewishDate(5783, JewishDate.ADAR, 17);
System.out.println(hdf.format(jCal) + " - Is tachanun recited: " + tr.isTachanunRecitedShacharis(jCal));
tr.setTachanunRecitedWeekOfPurim(false); //default is true
System.out.println(hdf.format(jCal) + " - Is tachanun recited: " + tr.isTachanunRecitedShacharis(jCal));

Output:

א׳ תשרי תשפ״ג - Is tachanun recited: false
כ״א שבט תשכ״ט - is mashiv haruch recited: true
י״ז אדר תשפ״ג - Is tachanun recited: true
י״ז אדר תשפ״ג - Is tachanun recited: false