Zmanim For Kiddush Levana Before Shavuos 5778

Crescent MoonRarely do you find zmanim that are days apart based on your location, but this year, that is exactly what will happen. With Shavuos falling on a Sunday and Monday, we end up with a “three-day Yom Tov” that impacts the earliest time / zman that קידוש לבנה Kiddush Levana can be said (for those who say it 3 days after the מולד molad). With the minhag that Kiddush Levana is not said on Shabbos or Yom Tov, there is only a small chance to say Kiddush Levana on Thursday night based on your location. The molad for the month of Sivan was at 6:00:23 am in Yerushalayim (5:21 am and 6 chalakim local mean time using the traditional calculation) on Rosh Chodesh Sivan, Tuesday May 15. This results in techilas zman kiddush levana 3 days later at 6:00:23 am Friday morning May 18. This is well after the moon sets, and actually after the sun rises. It can’t be said on Friday night, or Motzai Shabbos since it is Yom Tov. The earliest it can be said in Israel is on Sunday night. Much farther west in NY or Lakewood, NJ, where 2 days of Yom Tov are observed you get close to being able to say it on Thursday night, but not close enough. Kiddush Lavena could theoretically be said at 11:00 pm Thursday night, but by that time, the moon will already set (at 10:38 pm in Lakewood, and at 10:39 pm in Brooklyn, NY) and you end up having to wait until Monday night to say Kiddush Levana. From 11:00 pm on Monday night, even those who do not recite Kiddush Levana until 7 days after the molad can say it (moonset is at 1:20 am). Traveling farther west to Cleveland, OH with a moon set of 11:14 pm would seem to allow Kiddush Levana to be said on Thursday night. However, with the moon this close to the horizon, it would be almost impossible to see the moon and say Kiddush Levana on Thursday night before the moon set. Going a little farther west, we hit the first locations that can say Kiddush Levana on Thursday night. Chicago (and other areas along their longitude) with a techilas zman Kiddush Levana of 10:00 pm and a moonset of 10:40 pm would likely be the first places in the world to say Kiddush Levana this year.
Thus, from Chicago to the west coast of the USA and Canada, Kiddush Levana can be said 3 days before Israel, and 4 days before Europe and eastern USA and Canada.

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.

Update: Parsha Code Restored

On November 17, 2019 – י״ט מרחשון תש״פ an updated post Parsha Code Restored to the KosherJava Zmanim Calendar API announced the restoration of the parsha functionality.

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 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.

FAQ: Calculating the Baal Hatanya’s Shkiah

Baal Hatanya Zmanim

Please see the more recent and updated article Baal Hatanya’s Zmanim Added to KosherJava Zmanim Library for more current information.

Question:

How do I calculate the בעל התניא Baal Hatanya’s Zman for Shkiah as 4 minutes after sunset using the KosherJava Zmanim API?

Answer:

I was recently asked how to use the Zmanim API to calculate the Baal Hatanya’s opinion is that shkiah (halachic sunset) is 4 minutes after civil sunset. The assumption that the Baal Hatanya’s shkiah is a fixed 4 minutes after sunset is not that simple and will require a separate post to clarify. This zman should not be used lehalacha without consulting a rov. This post shows how to us the API assuming that it is a fixed 4 minutes after sunset. The technique to calculate this with the API is identical to the way getTzais72() would be calculated. The source of that method is

public Date getTzais72() {
return getTimeOffset(getSeaLevelSunset(), 72 * MINUTE_MILLIS);
}

The getTimeOffset(Date time, double offset) method in the base class AstronomicalCalendar is very simple:

public Date getTimeOffset(Date time, long offset) {
if (time == null || offset == Long.MIN_VALUE) {
return null;
}
return new Date(time.getTime() + offset);
}

The getTimeOffset method simply adds the number of milliseconds of the offset to the raw time of the zman and returns it as a date. While using the API itself is not needed for such a simple calculation, here is how it would be used:

String locationName = "Jerusalem";
double latitude = 31.778; // Har habayis
double longitude = 35.2354;// Har Habayis
double elevation = 0;
TimeZone timeZone = TimeZone.getTimeZone("Asia/Jerusalem");
GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);
ZmanimCalendar zc = new ZmanimCalendar(location);
Date baalHatanyaShkiah = zc.getTimeOffset(zc.getSeaLevelSunset(), 4 * 60000);
System.out.println("Baal Hatanya Shkiah: " + baalHatanyaShkiah);

Adding it to the API itself would be even simpler:

public Date getShkiahBaalHatanya() {
return getTimeOffset(getSeaLevelSunset(), 4 * MINUTE_MILLIS);
}

At some point in the future I may (doubtful) add this time to the API itself. The zman is not commonly used, and the Chabad calendars that I have seen all use regular sunset.

Update on ‍‍July 5, 2015 – י״ח תמוז תשע״ה: This article was updated to clarify that the Baal Hatanya’s opinion may not be a fixed 4 minutes, but that the post was showing how to use the API to calculate it based on the questioner’s assumption that it was a 4 minute zman.
Update on Dec 14, 2018 – ו׳ טבת תשע״ט: This article was superseded with the more recent and corrected article Baal Hatanya’s Zmanim Added to KosherJava Zmanim Library.

Forensic Zmanim Calculations

Claude Monet's Cliff at Etretat, Sunset
Claude Monet’s Cliff at Etretat, Sunset
Unrelated to practical zmanim calculations, it is fascinating to see that with enough work, astronomers were able to pinpoint the exact date and time that Claude Monet painted the Cliff at Etretat, Sunset painting based on the position of the sun at sunset. Researchers from Texas State University published information showing that the masterpiece was painted (or more accurately, visualized in Claude Monet’s mind) at 4:53PM on February 5th, 1883.
The picture of the Kosel below was taken by my grandfather Sidney (Nesanel) Siegfried. While I can’t pinpoint the exact time the picture was taken, I do know that it was taken in the early afternoon on Aug 1st, 1932 כ״ח תמוז תרצ״ב. I leave it to the readers of this post to try and calculate the exact time the picture was taken based on the shadows.
Picture of the Kosel taken by Sidney (Nesanel) Siegfried on Aug 1, 1932 כ״ח תמוז תרצ״ב
Picture of the Kosel taken by Sidney (Nesanel) Siegfried on Aug 1, 1932 כ״ח תמוז תרצ״ב