
The KosherJava site now has a new vasikin calendar generator tool. This allows vasikin minyanim to generate customized vasikin charts. Offsets for various pre-sunrise davening points can be set. There are separate weekday, Shabbos, Yom Tov and Rosh Hashana / Yom Kippur offsets for each davening point. The format of the charts is Excel, but it is optimized for printing eye pleasing charts.
I would like to thank Howard Reichman who requested a vasikin calendar for the Los Angeles LINK Kollel vasikin minyan that ended up with the development of this zmanim tool. Howard graciously funded the next 7 months of hosting for KosherJava.com.
Category: Software Dev
Tefila Rules Added to KosherJava Zmanim Library

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.
- Shemoneh Esreh Rules
- isMashivHaruachRecited(JewishCalendar)
- isMashivHaruachStartDate(JewishCalendar)
- isMashivHaruachEndDate(JewishCalendar)
- isMoridHatalRecited(JewishCalendar)
- isVeseinTalUmatarRecited(JewishCalendar)
- isVeseinTalUmatarStartingTonight(JewishCalendar)
- isVeseinTalUmatarStartDate(JewishCalendar)
- isVeseinBerachaRecited(JewishCalendar)
- Tachanun Rules
- Hallel Rules
- Possible Future Additions
- Lamnatzaiach
- Mizmor Lesoda
- Selichos
Yom Kippur Kattanadded to JewishCalendarHallel Shalem / Chatzi HalleladdedBeHaBadded to JewishCalendar- Vihi Noam on Motzai Shabbos
- …
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
NOAA Fixes Solar Calculator
When comparing the results of the KosherJava NOAA algorithm to the output of NOAA’s new Solar Calculator almost two years ago, a discrepancy was encountered between the two. There was no discrepancy compared to the output of the old NOAA calculator. The NOAA code is an implementation of the accurate Jean Meeus algorithm for solar time calculations, and the KosherJava code is a Java port of this algorithm. While attempting to debug the issue, I turned to Pinny Markowitz who ported the KosherJava library to both Ruby and Python. He was able to trace the issue to what seemed to be a small accuracy adjustment missing in the noon calculation on the new NOAA implementation. Based on Pinny’s analysis, the old implementation seemed correct, but without confirmation from the NOAA developers this was not a certainty. We reported the issue to NOAA for clarification, and after an almost two-year delay, the NOAA development team confirmed and corrected the bug. After NOAA’s fix there is no longer any discrepancy. The fix can be seen in line 342 of the NOAA JavaScript file, where a half day adjustment is made in the noon time calculation. This bug was never present in the KosherJava library, or other language ports of the KosherJava code, since our code was based on the original NOAA code.
Zmanim API 2.3.0 Released

The KosherJava Zmanim API version 2.3.0 was released on Dec 7th, 2021 ג׳ טבת תשפ״ב in Maven and GitHub. While there have been numerous releases over the years, this is the first release-related post since the v1.3.0 release in 2013. If you have not updated since that time, you can expect some changes. The most significant changes (besides a lot of new functionality) are the simple to fix breaking changes listed below.
New in Version 2.3.0
- Added seasonal davening based zmanim including Vesein Tal Umatar/ Vesein Berachah / Mashiv Haruach.
- Added Rav Moshe Feinstein’s fixed local chatzos based zmanim. These are used in MTJ and Yeshiva (and Camp) of Staten Island.
- Refactored code for alos and tzeis zmaniyos based time (ports of the library to other languages can simplify their code by doing the same).
- Fixed an issue with kiddush levana being off by an hour when the molad and kiddush levana zmanim are on different sides of the DST change. This impacted the JewishCalendar but not the ComplexZmanimCalendar.
- Corrected the Hebrew spelling of Parshas Nitzavim.
The list of significant changes in this and previous releases can be seen in the KosherJava Zmanim API changelog.
Breaking Changes since v1.3
- The Zmanim API no longer supports Java versions prior to Java 8 (released in March 2014). It likely still compiles against Java 6 released in December 2006.
- The package structure changed from net.sourceforge.zmanim to com.kosherjava.zmanim.
- There were two mathematically identical calculators using the USNO algorithm, so the less clean (code-wise) ZmanimCalculator was removed, while the SunTimesCalculator was retained.
Rav Moshe Feinstein’s Zmanim Added to the KosherJava Zmanim API

Rav Moshe Feinstein is of the opinion that chatzos is at a fixed time all year round and is calculated based on the location’s longitude (in Lakewood, NJ it is at 11:56am / 12:56pm during DST). See Igros Moshe Orach Chaim vol 4 no. 20 who states
והנה החצות לילה באמת לא משתנה כלל מימים הארוכים דקיץ לימים הקצרים חזודף אף לא לרגע אחד, למה שכתבתי בספרי אגדות משה על או״ח בסימן כ״ד שחצות היום הוא לעולם שוה שהוא כשבא השמש לאמצע הדרום וזה שוה בכל השנה רק ששני חצאי היום אינם שוים רק איזה ימים בשנה ולפעמים חצי הראשון גדול ולפעמים חצי השני גדול עיי״ש, וכן קבלתי גם מאבי מורי זצללה׳׳ה.
See the Igros Moshe for more details. The Aruch Hashulchan in Orach Chaim 233 no. 14 also calculates chatzos at a fixed time all year.
ודע דחצות היום תמיד שוה בקיץ ובחורף כשיכה המורה שעות י״ב אז הוי חצות היום וכן בלילה שהרי השעות שנתוספו או נתקצרו חציים מקודם חצות וחציים מלאחר חצות וא׳׳כ ממילא דהחצות לעולם עומדת בשוה
Rav Moshe also bases other zmanim calculations on this fixed local chatzos. As opposed to calculating shaaos zmaniyos from beginning to the end of a day, Rav Moshe calculates a number of zmanim based on half of the day starting or ending at fixed local chatzos (see Igros Moshe Orach Chaim vol 1, no. 23).
ומש״כ ידידי שהלוח של הישיבה אינו מדוקדק, הנה הוא בדיוק גדול ונכתב על דעתי. והטעם דהחצות של היום שהוא כשבא השמש באמצע הדרום שוה לעולם, אבל שני חצאי היום אינם שוים רק איזה ימים בשנה ולפעמים חצי הראשון גדול ולפעמים חצי האחרון. ולכן בין לקולא בין לחומרא מסתבר שנחלקו שש שעות עד חצות ושש שעות מחצות עד הערב. ולכן מש״כ ידידי שהוא שבשתא וטעות לא דבר נכונה שהוא אמת גמור וליכא ע״ז שום קושיא.
These zmanim are used in Mesivta Tiferet Yerushalayim (MTJ), Yeshiva of Staten Island and Camp Yeshiva of Staten Island. Code to calculate these Rav Moshe zmanim is now part of the latest v2.3.0 release of the KosherJava Zmanim API.
The following new zmanim are now included in the API:
- Sof zman shma alos 18° to fixed local chatzos
- Sof zman shma alos 16.1° to fixed local chatzos
- Sof zman shma alos 90 minutes before sunrise to fixed local chatzos
- Sof zman shma alos 72 minutes before sunrise to fixed local chatzos
- Sof zman shma sunrise to fixed local chatzos
- Sof zman tfila sunrise to fixed local chatzos
- Mincha gedola 30 minutes after fixed local chatzos
- Mincha ketana fixed local chatzos to sunset
- Plag hamincha fixed local chatzos to sunset
- Tzais 50 minutes after sunset
Sample Usage
For developers, here is sample code that calculates the new zmanim. This should allow many zmanim apps to add Rav Moshe Feinstein’s zmanim with very little effort.
String locationName = "145 E Broadway, New York, NY"; double latitude = 40.7138; double longitude = -73.9913; double elevation = 11; TimeZone timeZone = TimeZone.getTimeZone("America/New_York"); GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone); ComprehensiveZmanimCalendar czc = new ComprehensiveZmanimCalendar(location); czc.getCalendar().set(1986, Calendar.MARCH, 23); //Rav Moshe's petirah System.out.println("Sof zman shma alos 18° to fixed local chatzos: " + czc.getSofZmanShmaMGA18DegreesToFixedLocalChatzos()); System.out.println("Sof zman shma alos 16.1° to fixed local chatzos: " + czc.getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos()); System.out.println("Sof zman shma alos 90 to fixed local chatzos: " + czc.getSofZmanShmaMGA90MinutesToFixedLocalChatzos()); System.out.println("Sof zman shma alos 72 to fixed local chatzos: " + czc.getSofZmanShmaMGA72MinutesToFixedLocalChatzos()); System.out.println("Sof zman shma sunrise to fixed local chatzos: " + czc.getSofZmanShmaGRASunriseToFixedLocalChatzos()); System.out.println("Sof zman tfila sunrise to fixed local chatzos: " + czc.getSofZmanTfilaGRASunriseToFixedLocalChatzos()); System.out.println("Mincha gedola 30 minutes after fixed local chatzos: " + czc.getMinchaGedolaGRAFixedLocalChatzos30Minutes()); System.out.println("Mincha katana fixed local chatzos to sunset: " + czc.getMinchaKetanaGRAFixedLocalChatzosToSunset()); System.out.println("Plag hamincha fixed local chatzos to sunset: " + czc.getPlagHaminchaGRAFixedLocalChatzosToSunset()); System.out.println("Tzais 50 minutes after sunset: " + czc.getTzais50());
Calculating other fixed local chatzos based zmanim not included in the library (and not necessarily endorsed by this shitta) are very simple with the generic getFixedLocalChatzosBasedZmanim(Date startOfHalfDay, Date endOfHalfDay, double hours) method built to simplify calculating these zmanim. Here are a few examples.
//4 hours into a day based on half the day from alos 18° to fixed local chatzos System.out.println("Sof zman tfila 18° to fixed local chatzos: " + czc.getFixedLocalChatzosBasedZmanim(getAlos18Degrees(), getFixedLocalChatzos(), 4); //plag hamincha based on the second half of the day starting at fixed local chatzos and ending 50 minutes after sunset System.out.println("Plag hamincha fixed local chatzos to tzais 50 minutes: " + czc.getFixedLocalChatzosBasedZmanim(getFixedLocalChatzos(), getTzais50(), 4.75);
I would like to thank Avraham David Gelbfish who requested this addition and provided instructions on the proper calculations used by these yeshivos in calculating the zmanim.