Parsha Code Restored to the KosherJava Zmanim Calendar API

Sunrise CalendarIn the Parsha Code Removed from KosherJava Zmanim Calendar API article posted two years ago, I documented the removal of the the parsha code from the KosherJava Zmanim API due to licensing issues. I would like to announce that thanks to Yechiel Paricher, the zmanim library now supports a clean LGPL implementation. Yechiel’s Jan 17, 2019 pull request that was a port of his C libzmanim code, was finally merged on August 22nd, and over the past day, the old formatting code for parshiyos was restored after being changed to work with the new code. The new code not only restores the old functionality, but adds support for the special parshiyos of Shekalim, Zachor, Parah and Hachodesh. It also added support for Shabbos Mevorchim and Machar Chodesh.

Is the Year 5780 Spelled תש”פ or תש”ף?

Luach Davar Be’ito 5780 Showing both תש”פ and תש”ף
With the start of the new year 5780, I have been asked the following question numerous times. What is the proper Hebrew spelling of the Jewish year 5780 (2019/2020). Is it spelled תש”פ or תש”ף? This is the first time in 30 years that we have this “burning” question, with the previous one being 5750 (1989/1990) תש”נ or תש”ן. The question arises when the Hebrew spelling of the Jewish year ends with a Hebrew final form (also known as end, “ende” or straight (versus bent)) letter of מנצפ”ך. This happens in years ending with a 20, 40, 50, 80 or 90. According to the Academy of the Hebrew Language’s article שנת תש”ף regarding the spelling of the year, the final form תש”ף is the correct spelling. However, things are not that simple. The excellent 1,700+ page calendar לוח דבר בעתו / Luach Davar Be’ito published annually by Rabbi Mordechai Genut, straddles this by showing one form on the front cover and the other on the spine. In the introduction, Rabbi Genut writes:

ישבנו על המדוכה כיצד לכתוב תש״ף או תש״פ. כדי לרצות בעלי 2 הדעות, נקטנו (כאשר נקטנו בלוח ה׳תש״ן) שבשער הכריכה יכתב ה׳תש״פ ואילו בכריכת הגב יכתב ה׳תש״ף.

In the calendar he published an 11 page essay on the subject by Rabbi Yaakov Matalon who provides the following reasons to use the תש”פ version:

  • ראשי תיבות or Hebrew abbreviations only end with a final form letter if the abbreviation is typically read as a word such as רמב״ם ,רמב״ן and רי״ף. Abbreviations such as יוה״כ that are read as יום הכיפורים are always spelled ending in a non-final form letter. The Academy of the Hebrew Language reads the year as the proper word תָּשָׁ״ף, while many (most) disagree and read it as תאו-שין-פא.
  • The abbreviated year is not an abbreviation at all, but a number in its Hebrew format, and final form letters do not belong at the end of a number. This has been the tradition in writing and publishing Jewish books, where the non-final form spelling of page and chapter numbers has traditionally been used. This can be seen in the Talmud, Shulchan Aruch, Tehilim and other sefarim. There have been exceptions to this rule, but they are indeed exceptions. The same tradition is in place on most Jewish monuments.
  • In some cases the final form מנצפ”ך letters are considered to have a different numerical value. See the Sefer Haaruch on the אטב״ח entry (the Atbach / אטב״ח cipher should not be confused with the אתב”ש / Atbash cipher) and the Maharsha’s explanation on Rashi in Sukka 52b.
  • For kabbalistic reasons the Sefer Chassidim in chapter 1154 mentions that the end form of the letter ף is avoided where possible in tefilah (מוסף is an unavoidable exception). The Sefer Harokeach mentions the same concept in chapter 337 regarding the lack of any ף in Birkas Hamazon. This would apply to this year that ends in an 80, but not the other 4 examples every century.

Rabbi Matalon ends with:

מסקנתנו היא, שמִּבֵּין שני האֳפנים, עדיף לכתוב באות רגילה, לא-סופית: תש״פ, תש״צ. מכּל השיקולים נמצא שזה האופן העדיף. מצד שני, נראה שאין מקום לטענה שהכותב באות-סופית, תש״ף, תש״ץ וכדומה, טועה הוא. אופן כתיבה זה, למרות חסרונותיו, מקובל אצל רבים, ואין מי שרואה בו טעות.

In short, neither is incorrect, but the better of the two is the non-final form תש”פ.

Formatting the Year in the KosherJava Zmanim API

The HebrewDateFormatter class in the KosherJava zmanim library coded years ago produced the final form of תש״ף (with the exception of single character years such as the year 5050). This logic was included in all ports that I am aware of. With a recent commit, the option for formatting years ending in מנצפ״ך was added, and the default changed to produce the non-final form version of תש”פ. Detailed information can be seen in the HebrewDateFormatter API documentation.

Parsha Code Removed from KosherJava Zmanim Calendar API

Sunrise CalendarDue to licensing issues that were brought to my attention last year, the parsha code was removed from the Zmanim API on Aug 22, 2016. In the future I may release the parsha code as a standalone module under the GPL license, or create a new LGPL implementation. To understand this more clearly, the current Zmanim API is licensed under the LGPL, while the parsha code contained some GPL code that had to be removed in order to retain the LGPL license. I would welcome any code submission for parsha code that could be released under the LGPL.

FAQ: Different Parshas Hashavua in Eretz Yisrael Than Chutz La’aretz

Question:

Why does the KosherJava Zmanim API seem to sometimes return the incorrect parshas hashavua in Israel?

Answer:

I have had a number of inquiries this year about the incorrect Parshas Hashavua being returned by the API. In all cases this has been a complaint for Eretz Yisrael and not Chutz La’aretz. The explanation is pretty simple and covered in the API documentation for the JewishCalendar class, but may not be clear to all. When the first day of Pesach occurs on a Shabbos, as it did this year (5775), the last day of Pesach in Eretz Yisrael is on a Friday. The following day is a regular Shabbos in Eretz Yisrael with the usual krias hatorah, but in chutz la’aretz it is the 8th day of Pesach, resulting in Pesach kriah. The following weeks will have different krias hatorah in Eretz Yisrael vs chutz la’aretz, and this will continue for a number of weeks until a double parsha in chutz laaretz is added to equalize the parsha. This last occurred in 2012 (before the release of the calendar functionality in the Zmanim 1.3 release), and will occur again next year. If you are coding to display the Parshas Hashavuah for use in Israel, it is important to set the inIsrael flag (it defaults to false).

JewishDate.setInIsrael(true);

A fuller example showing how to set the indicator and showing the comparison of Eretz Yisrael and Chutz Laaretz this year can be seen in this example.

JewishCalendar israelCalendar = new JewishCalendar(5775, JewishDate.NISSAN, 7);
israelCalendar.setInIsrael(true); //set the calendar to Israel
JewishCalendar chutsLaaretzCalendar = new JewishCalendar(5775, JewishDate.NISSAN, 7);
chutsLaaretzCalendar.setInIsrael(false); //not really needed since the API defaults to false
HebrewDateFormatter hdf = new HebrewDateFormatter();
System.out.println("Date\tChutz Laaretz / Eretz Yisrael"));
for(int i = 0; i < 57; i++){
	israelCalendar.forward(); //roll the date forward a day
	chutsLaaretzCalendar.forward(); //roll the date forward a day
	if(chutsLaaretzCalendar.getDayOfWeek() == 7){ //ignore weekdays
		System.out.println(hdf.formatParsha(chutsLaaretzCalendar) + "\t" + hdf.formatParsha(israelCalendar) + " \\ " + hdf.format(chutsLaaretzCalendar));
	}
}

the output of this is

Date               Chutz Laaretz / Eretz Yisrael
8 Nissan, 5775     Tzav / Tzav
15 Nissan, 5775     / 
22 Nissan, 5775     / Shmini
29 Nissan, 5775    Shmini / Tazria Metzora
6 Iyar, 5775       Tazria Metzora / Achrei Mos Kedoshim
13 Iyar, 5775      Achrei Mos Kedoshim / Emor
20 Iyar, 5775      Emor / Behar
27 Iyar, 5775      Behar Bechukosai / Bechukosai
5 Sivan, 5775      Bamidbar / Bamidbar

It should be noted that this discrepancy is not rare and happens about 25% of the calendar years.