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

KosherJava Zmanim API FAQ

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 eighth day of Pesach, with the krias hatorah for Pesach. 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 la’aretz brings the two back in sync. 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 hashavua for use in Israel, it is important to call setInIsrael(true) on the calendar (it has a default of false).

Note: The code samples below have been updated for the KosherJava Zmanim 3.x API.
jewishCalendar.setInIsrael(true);

A fuller example showing how to set the indicator and showing the comparison of Eretz Yisrael and chutz la’aretz 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 chutzLaaretzCalendar = new JewishCalendar(5775, JewishDate.NISSAN, 7);
chutzLaaretzCalendar.setInIsrael(false); //not really needed since the API defaults to false
HebrewDateFormatter hdf = new HebrewDateFormatter();
System.out.println(String.format("%-18s %s", "Date", "Chutz Laaretz / Eretz Yisrael"));
for (int i = 0; i < 57; i++) {
	israelCalendar.plusDays(1); //roll the date forward a day
	chutzLaaretzCalendar.plusDays(1); //roll the date forward a day
	if (chutzLaaretzCalendar.getDayOfWeek() == 7) { //only output Shabbos
		System.out.println(String.format("%-18s %s / %s", hdf.format(chutzLaaretzCalendar),
				hdf.formatParshah(chutzLaaretzCalendar), hdf.formatParshah(israelCalendar)));
	}
}

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. Besides years when the first day of Pesach is on Shabbos, it also happens when Pesach starts on a Thursday, since the second day of Shavuos then falls on Shabbos in chutz la’aretz. Between the two, the krias hatorah differs for part of the year in a little more than half of all years.

5 thoughts on “FAQ: Different Parshas Hashavua in Eretz Yisrael Than Chutz La’aretz”

Leave a Reply

Your email address will not be published. Required fields are marked *

To post code, wrap it in a shortcode for its language, such as [java]…[/java], [js]…[/js] or [php]…[/php], or [code]…[/code] for plain text.