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 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 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(true)
flag (it has a default of 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.
Hi,
Thanks for the great app. Please add the time of Mincha Ketana.
Reuven,
Please see Zmanim Project page where you will see that the Zmanim API supports 5 different Mincha Ketana zmanim.
Regarding the sedra discrepancy now between EY and CL, why indeed do we not just lein two sedros this week to make us equal?
Hi,
The function HebrewDateFormatter.formatParsha doesn’t exists in my version of the Java Library, is it normal ?
Julien,
Parsha code was removed due to licensing issues. The good news is that there is a pull request from yparitcher to restore it. I hope to get to it sooner or later (I hope sooner).