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.
Category: Zmanim
Using the Zmanim API 1.3.0 Jewish Calendar Code
The recently released Zmanim API 1.3.0 added Jewish calendar support to the API. Previously, the API had zmanim support, but no Jewish calendar support. While the calendar code is in beta mode and is subject to API changes, below are some simple code examples using the current 1.3.0 release. These examples of the use of the JewishCalendar and HebrewDateFormatter classes do not fully cover the functionality available in the Zmanim API. Please read the JavaDocs and experiment. Please let me know if there are any calendar related items that you feel should change or be added to the API.
Setting and outputting formatted dates
JewishCalendar jd = new JewishCalendar(); // current date 23 Nissan, 5773 HebrewDateFormatter hdf = new HebrewDateFormatter(); System.out.println(jd); // prints hebrew date in English chars - 23 Nissan, 5773 hdf.setHebrewFormat(true); // change formatting to Hebrew System.out.println(hdf.format(jd)); // date formatted in Hebrew jd.setJewishDate(5729, JewishDate.SHEVAT, 21); // set the date to 21 Shevat, 5729 System.out.println(hdf.format(jd)); // date formatted in Hebrew jd.setJewishDate(5772, JewishDate.NISSAN, 18); // set date to third day of Pesach System.out.println(hdf.format(jd)); System.out.println(hdf.formatYomTov(jd)); //output Chol Hamoed Pesach in Hebrew hdf.setHebrewFormat(false); // change formatting to default System.out.println(hdf.format(jd)); // prints Hebrew date in English chars - 18 Nissan, 5772 System.out.println(hdf.formatYomTov(jd)); //output Chol Hamoed Pesach
Output:
23 Nissan, 5773 כ״ג ניסן תשע״ג כ״א שבט תשכ״ט י״ח ניסן תשע״ב חול המועד פסח 18 Nissan, 5772 Chol Hamoed Pesach
Parshas Hashavua
Please note that the parsha will only input if the date is a Shabbos. This is something that may change down the line.
HebrewDateFormatter hdf = new HebrewDateFormatter(); JewishCalendar jd = new JewishCalendar(5773, JewishDate.NISSAN, 12); System.out.println(hdf.formatParsha(jd)); hdf.setHebrewFormat(true); System.out.println(hdf.formatParsha(jd)); jd.back(); System.out.println("Parsha on Friday [" + hdf.formatParsha(jd) + "]"); //no Parsha output on a non Shabbos jd.setJewishDate(5773, JewishDate.TAMMUZ, 28); //double parsha System.out.println(hdf.formatParsha(jd));
Output:
Tzav צו Parsha on Friday [] מטות מסעי
Rosh Chodesh
HebrewDateFormatter hdf = new HebrewDateFormatter(); JewishCalendar jd = new JewishCalendar(5773, JewishDate.NISSAN, 1); if(jd.isRoshChodesh()){ //not necessary for formatter System.out.println(hdf.formatRoshChodesh(jd)); } hdf.setHebrewFormat(true); System.out.println(hdf.formatRoshChodesh(jd)); jd.forward();// roll calendar to second day of Nisan System.out.println("output[" + hdf.formatRoshChodesh(jd) + "]"); //no output for Rosh Chodesh Formatting
Output:
Rosh Chodesh Nissan ראש חודש ניסן output[]
Daf Yomi
JewishCalendar jd = new JewishCalendar(); HebrewDateFormatter hdf = new HebrewDateFormatter(); System.out.println(hdf.format(jd)); //output current formatted date "13 Nissan, 5773" Daf daf = jd.getDafYomiBavli(); //get the current daf System.out.println(daf.getMasechtaTransliterated()); //outout transliterated masechta name "Eruvin" System.out.println(daf.getDaf()); //output current daf (page) number "16" System.out.println(hdf.formatDafYomiBavli(daf)); //outout the formatted date "Eruvin 16" hdf.setHebrewFormat(true); //set formatted to Hebrew System.out.println(hdf.format(jd)); //output date in Hebrew "י״ג ניסן תשע״ג" System.out.println(daf.getMasechta()); // output masechta name in Hebrew "עירובין" System.out.println(hdf.formatHebrewNumber(daf.getDaf()));//output the daf number formatted in Hebrew "ט״ז" System.out.println(hdf.formatDafYomiBavli(daf)); //output daf and masechta in Hebrew "עירובין ט״ז"
Output:
13 Nissan, 5773 Eruvin 16 Eruvin 16 י״ג ניסן תשע״ג עירובין ט״ז עירובין ט״ז
Chanukah
JewishCalendar jd = new JewishCalendar(5772, JewishDate.KISLEV, 25); //set date to first day of Chanukah HebrewDateFormatter hdf = new HebrewDateFormatter(); System.out.println(jd);//output current transliterated date System.out.println(jd.getDayOfChanukah()); //output #1 System.out.println(hdf.formatYomTov(jd)); //output Chanukah 1 hdf.setHebrewFormat(true); //set format to hebrew System.out.println(hdf.formatHebrewNumber(jd.getDayOfChanukah())); //output 1 in Hebrew System.out.println(hdf.formatYomTov(jd)); // output Chanukah 1 in hebrew
Output:
25 Kislev, 5772 1 Chanukah 1 א׳ א׳ חנוכה
Note, that there is no simple way at this point to output just Chanukah. This will likely change in the future to match Chanukah to the behavior of other Yomim Tovim.
Loop and output an entire year
JewishCalendar jc = new JewishCalendar(5773, JewishDate.TISHREI, 1); jc.setInIsrael(false); //default false for clarity but not needed. Set to true for Israel HebrewDateFormatter hdf = new HebrewDateFormatter(); hdf.setHebrewFormat(true); HebrewDateFormatter hdfTransliterated = new HebrewDateFormatter(); String hebrewOutput = ""; String transliteratedOutput = ""; while(jc.getJewishYear() == 5773){ hebrewOutput = hdf.format(jc); transliteratedOutput = hdfTransliterated.format(jc); if (jc.isYomTov() || jc.isTaanis()) { hebrewOutput += ", " + hdf.formatYomTov(jc); transliteratedOutput += ", " + hdfTransliterated.formatYomTov(jc); } else if(jc.getDayOfWeek() == 7){ hebrewOutput += " - " + hdf.formatParsha(jc); transliteratedOutput += " - " + hdfTransliterated.formatParsha(jc); } if (jc.isChanukah()) { if (hebrewOutput.length() > 0) { hebrewOutput += ", "; transliteratedOutput += ", "; } hebrewOutput += hdf.formatYomTov(jc); transliteratedOutput += hdfTransliterated.formatYomTov(jc); } if (jc.isRoshChodesh()) { if (hebrewOutput.length() > 0) { hebrewOutput += ", "; transliteratedOutput += ", "; } hebrewOutput += hdf.formatRoshChodesh(jc); transliteratedOutput += hdfTransliterated.formatRoshChodesh(jc); } if(jc.getDayOfOmer() > 0){ hebrewOutput += ", "; transliteratedOutput += ", "; hebrewOutput += hdf.formatOmer(jc); } System.out.println(transliteratedOutput + " - " + hebrewOutput); jc.forward(); }
Output (most days removed for brevity):
1 Tishrei, 5773, Rosh Hashana - א׳ תשרי תשע״ג, ראש השנה 2 Tishrei, 5773, Rosh Hashana - ב׳ תשרי תשע״ג, ראש השנה 3 Tishrei, 5773, Fast of Gedalyah - ג׳ תשרי תשע״ג, צום גדליה 4 Tishrei, 5773 - ד׳ תשרי תשע״ג ... 6 Tishrei, 5773 - Vayeilech - ו׳ תשרי תשע״ג - וילך ... 10 Tishrei, 5773, Yom Kippur - י׳ תשרי תשע״ג, יום כיפור ... 15 Tishrei, 5773, Succos - ט״ו תשרי תשע״ג, סוכות 16 Tishrei, 5773, Succos - ט״ז תשרי תשע״ג, סוכות 17 Tishrei, 5773, Chol Hamoed Succos - י״ז תשרי תשע״ג, חול המועד סוכות 18 Tishrei, 5773, Chol Hamoed Succos - י״ח תשרי תשע״ג, חול המועד סוכות 19 Tishrei, 5773, Chol Hamoed Succos - י״ט תשרי תשע״ג, חול המועד סוכות 20 Tishrei, 5773, Chol Hamoed Succos - כ׳ תשרי תשע״ג, חול המועד סוכות 21 Tishrei, 5773, Hoshana Rabbah - כ״א תשרי תשע״ג, הושענא רבה 22 Tishrei, 5773, Shemini Atzeres - כ״ב תשרי תשע״ג, שמיני עצרת 23 Tishrei, 5773, Simchas Torah - כ״ג תשרי תשע״ג, שמחת תורה ... 30 Tishrei, 5773, Rosh Chodesh Cheshvan - ל׳ תשרי תשע״ג, ראש חודש חשוון 1 Cheshvan, 5773, Rosh Chodesh Cheshvan - א׳ חשוון תשע״ג, ראש חודש חשוון ... 25 Kislev, 5773, Chanukah 1 - כ״ה כסלו תשע״ג, א׳ חנוכה 26 Kislev, 5773, Chanukah 2 - כ״ו כסלו תשע״ג, ב׳ חנוכה 27 Kislev, 5773, Chanukah 3 - כ״ז כסלו תשע״ג, ג׳ חנוכה 28 Kislev, 5773, Chanukah 4 - כ״ח כסלו תשע״ג, ד׳ חנוכה 29 Kislev, 5773, Chanukah 5 - כ״ט כסלו תשע״ג, ה׳ חנוכה 1 Teves, 5773, Chanukah 6, Rosh Chodesh Teves - א׳ טבת תשע״ג, ו׳ חנוכה, ראש חודש טבת 2 Teves, 5773 - Miketz, Chanukah 7 - ב׳ טבת תשע״ג - מקץ, ז׳ חנוכה 3 Teves, 5773, Chanukah 8 - ג׳ טבת תשע״ג, ח׳ חנוכה ... 10 Teves, 5773, Tenth of Teves - י׳ טבת תשע״ג, עשרה בטבת ... 15 Shevat, 5773, Tu B'Shvat - ט״ו שבט תשע״ג, ט״ו בשבט ... 21 Shevat, 5773 - כ״א שבט תשע״ג ... 11 Adar, 5773, Fast of Esther - י״א אדר תשע״ג, תענית אסתר ... 14 Adar, 5773, Purim - י״ד אדר תשע״ג, פורים 15 Adar, 5773, Shushan Purim - ט״ו אדר תשע״ג, פורים שושן ... 27 Adar, 5773 - Vayakhel Pekudei - כ״ז אדר תשע״ג - ויקהל פקודי ... 15 Nissan, 5773, Pesach - ט״ו ניסן תשע״ג, פסח 16 Nissan, 5773, Pesach, - ט״ז ניסן תשע״ג, פסח, א׳ בעומר 17 Nissan, 5773, Chol Hamoed Pesach, - י״ז ניסן תשע״ג, חול המועד פסח, ב׳ בעומר 18 Nissan, 5773, Chol Hamoed Pesach, - י״ח ניסן תשע״ג, חול המועד פסח, ג׳ בעומר 19 Nissan, 5773, Chol Hamoed Pesach, - י״ט ניסן תשע״ג, חול המועד פסח, ד׳ בעומר 20 Nissan, 5773, Chol Hamoed Pesach, - כ׳ ניסן תשע״ג, חול המועד פסח, ה׳ בעומר 21 Nissan, 5773, Pesach, - כ״א ניסן תשע״ג, פסח, ו׳ בעומר 22 Nissan, 5773, Pesach, - כ״ב ניסן תשע״ג, פסח, ז׳ בעומר 23 Nissan, 5773, - כ״ג ניסן תשע״ג, ח׳ בעומר ... 26 Nissan, 5773 - Shmini, - כ״ו ניסן תשע״ג - שמיני, י״א בעומר ... 6 Sivan, 5773, Shavuos - ו׳ סיוון תשע״ג, שבועות 7 Sivan, 5773, Shavuos - ז׳ סיוון תשע״ג, שבועות ... 17 Tammuz, 5773, Seventeenth of Tammuz - י״ז תמוז תשע״ג, שבעה עשר בתמוז ... 9 Av, 5773, Tishah B'Av - ט׳ אב תשע״ג, תשעה באב ... 15 Av, 5773, Tu B'Av - ט״ו אב תשע״ג, ט״ו באב ...
Zmanim API 1.3.0 Released
The Zmanim API version 1.3.0 was released on March 4th, 2013 כ״א אדר תשע״ג. Various changes in the new release VS the previous version 1.2.1 that was released in May 2010 can be seen below. This release includes beta support for Jewish Calendar calculations as well as a number of updated zmanim and refactored code. The Jewish Calendar support in the Zmanim API is based on Avrom Finkelstien’s HebrewDate project released in 2002. Unlike the Zmanim code, the Jewish calendar interfaces may change significantly in the future (see Jay Gindin’s various changes that may make it into this API) and should therefore be considered beta.
Changes in the Zmanim API 1.3.0 release
- Refactoring of zmanim calculations to allow more flexibility in generating custom zmanim. New generic methods that take an arbitrary start and end of day for many zmanim such as sofZmanShema and getPlagHamincha etc. This makes calculating atypical zmanim that I had not anticipated when creating the API. I receive such requests from time to time, and the changes greatly simplify these types of calculations. Examples of recent requests are:
- Zman krias Shema calculated from alos as 72 minutes before netz and tzais as 7.083 degrees
- Plag hamincha from alos 7.083° to tzais 7.083°
- Many rounds of general code refactoring to simplify and stabilize the code and make it easier to port. Thank you Jay Gindin for his many suggestions.
- The addition of Erev Pesach zmanim to the Zmanim API
- Added Tzais Geonim 3.676 degrees (18 minutes as calculated by Stanley Fishkind)
- Calculation of Kiddush Levana and molad times
- Hebrew calendar support (with formatters and Yom Tov calendar)
- Daf Yomi calendar
- A number of bug fixes including a fix to DST correction, and a calendar date correction
- Changing the license of the KosherJava Zmanim API from GPL 2 to LGPL 2.1
- Many additions and clarifications to the Zmanim API JavaDoc documentation. My thanks to Reb Feivel Muller for his valuable input.
- Removal of the deprecated (and inaccurate) JSuntimeCalculator.java class. This has been deprecated since 2008. The NOAACalculator replaced this class.
- Deprecation of the getSofZmanShmaKolEliyahu() method. Thank you to Rabbi Yisroel Boruch Twerski for pointing out that the Yisrael Vehazmanim was incorrect in including this zman. This is something he discussed with Rabbi Harfenes.
- Uniformly return zmanim based on sea level sunrise and sunset. Most zmanim had this fix a long time ago, but there were a few zmanim such as candle lighting time that were corrected.
- The getCandleLighting() method had a spelling correction (it had been getCandelLighting)
Changes since March 23, 2011 have been in SVN and detailed changes can be seen there.
Zmanim Map 3.5 adds Date and Algorithm Selection
The Zmanim Map was recently updated to version 3.5. This new release adds a number of new features (listed below), and some technical changes over the previous Zmanim Map 3.0 release. With this release, the main focus of the map has shifted to the zmanim tabs. The direction to Yerushalayim tab with davening directions using both the rhumb line and great circle route to Yerushalayim is still present, but is no longer the default tab.
- The date can now be selected by the user. In previous versions the date was always the current date on the user’s computer (though the map always supported passing the date on the URL using the undocumented date=1969-02-08 parameter). The current date is still the default, but the user can now change the date.
- The calculation algorithm is now selectable. The Zmanim API supports both the USNO and NOAA algorithms. The map has always used the USNO algorithm, and this remains the default, but users can now use the NOAA algorithm.
- The Zmanim tab is now the default tab. This reflects user feedback indicating that most people use the map for zmanim.
- An About tab now provides a mini user guide and general information about the map.
- The timezone look-up now uses the Google Time Zone API. Previously the map had been using the Geo Names web service. Since the elevation service also uses Google, the change to a single stable source will hopefully result in fewer outages.
- The currently selected tab persists across location changes, so if you were viewing zmanim for a location, and changed the location to see how the zmanim were affected, you will no longer have to change tabs after each move.
- Candle Lighting was added for Fridays. Erev Yom Tov will not show candle lighting at this point.
- Performance improvements, minor enhancements, bug fixes and refactoring
The Halachic Date Line Map
The International Date Line is an internationally agreed upon, arbitrarily selected, line that demarcates one calendar day from the next. This line is about 180° from Greenwich and was selected since it is opposite Greenwich and mostly runs through uninhabited areas. The line (see the gray line in the map above) meanders around national borders and island groups. The halachic date line (קו התאריך) is a complex subject with various opinions. See Rabbi Dovid Heber’s excellent article A Traveler’s Guide to the International Date Line in the Star-K Kashrus Kurrents for additional information. This line changes from time to time, as countries decide to change from one side of the date line to the other. The most recent change was when Samoa shifted to the west of the line at the end of 2011. Discussing the Samoa change in a December 29th, 2011 Yeshiva World article How to Keep This Shabbos in Samoa?, Rabbi Dovid Heber stated that
According to almost all opinions, the Halachic Date Line is not determined by what the locals call “Saturday” and therefore, the fact that Samoa changes the date line does not change when we keep Shabbos.
As far as I know, until this point, there has not been a very exact map allowing one to determine with clarity the exact parts of the world affected by the Halachic Date Line. As an example, see Rabbi Yisroel Taplin’s sefer Taarich Yisrael תאריך ישראל for a discussion about possibly not visiting the Philippines due to questions about the exact location of the date line. With the introduction of the Halachic Date Line Map such ambiguities can be laid to rest since users can zoom in to find the exact locations of various opinions on the map (see the map partially zoomed in to the Philippines for example).
Location of the Halachic Date Line
There are various opinions about the location of the halachic date line. The three main opinions of the location of the Halachic Date Line are:
- The חזון איש Chazon Ish quoting the כוזרי Kuzari and the בעל המאור Baal Hamaor who state that the date line is 90° east of the Har Habayis.
- Rabbi Yechiel Michel Tucazinsky (author of the Gesher Hachaim) who wrote the היומם בכדור הארץ Hayomam Bekadur Haaretz stating his opinion that the date line is 180° east (or west) of Har Habayis. Among those agreeing with this opinion is Rabbi Elyashiv. Since this line is exactly halfway around the world from Yerushalayim, a person on different sides of this line will face different directions when davening (using the rhumb line method). A person located west of the line will daven westward, and a person east of the line will daven eastwards. See the Bearing to Yerushalayim Map for a location along this line (the green line). Click on the blue pushpin in the map (below the green line) for additional information on the antipodal point of the Har Habayis.
- Rabbi Menachem Mendel Kasher in his קו התאריך הישראלי Kav Hattarich Hayisraeli is of the opinion that the International Date Line is used. Among those agreeing with this opinion was Rabbi Isser Zalman Meltzer.
The locations of the three lines are mostly over the Pacific Ocean, but in some places the lines intersect dry land. Examples of this are Russia, China, Korea, The Philippines, Indonesia, East Timor and Australia that are split by the Kuzary and Baal Hamaor’s line (see the map above). The Chazon Ish brings the opinion of the יצחק הישראלי Yitzchak Hayisraeli (a disciple of the רא״ש Rosh) in the יסוד עולם Yesod Olam 2:17 and 4:7–8, that when the line intersects dry land, the line is extended eastward (or on occasion westward according to the 180° opinion). This extension is referred to as גרירה / graira, where the land to the west “drags” the land it is attached to, to within the line. In the map, both the 90° (Chazon Ish) and 180° (Rabbi Tucazinsky) lines are measured from Har Habayis. Specifically, the measurements in the map are from the center of the Dome of the Rock. This is the location of the Kodesh Kodashim according to the רדב״ז Radvaz. According to the רד”ק Radak the center of the Dome of the Rock is the location of the mizbeach, and the Kodesh Kodashim is 101 amos (about 54 meters / 180 feet) west of this point. According to the Radak the International Date Line would be 101 amos west of the lines in the map.
How the Map Works
The Halachic Date Line Map works like any other Google Map. You can zoom into any area to see a close-up. Clicking on the lines and shaded in graira areas will provide some details about it. The map will show a very clear and exact position of the Halachic Date Line according to different halachic opinions.
Interesting points on the map
- Tahania Atoll, a small atoll in French Polynesia that is intersected by Rabbi Tucazinsky’s line. To the south of this point is the island of Rapa Iti. There is an interesting Halachic phenomenon at this location with Kiddush Levana in December 2027. See Rabbi Heber’s Sefer Shaarei Zemanim שערי זמנים. Rabbi Heber graciously allowed me to post סימן ד׳ קונטרס זמן קידוש לבנה of the Shaarei Zemanim here. The discussion of Kiddush Levana on Rapa Iti appears on page 14 of the pdf which is page 32 in the sefer.
- The Wrangell Mountain Homestead in Alaska, along the Edgerton Highway between Kenny Lake, and Chitina seems to be the only inhabited place that is that is intersected by Rabbi Tucazinsky’s line. The line cuts through what seems to be a barn. Thank you Rabbi Heber for this interesting observation.
- The camping grounds and recreational area of the Childs Glacier Recreation Area in Alaska touches the line. The nearby Miles Glacier Bridge (the Million Dollar Bridge), has a clear view of the line to the west. Farther north, the Red Eagle Lodge in Gakona, Alaska is probably the closest lodging that you can find to the line, with a 3-mile westward hike (or drive along Tok Highway) to the line.
- Ikema Island is intersected by the Baal Hamaor’s line. According to the Chazon Ish graira covers the entire Ikema Island but would not (according to Rabbi Dovid Heber of the Star-K) extend over the bridge to Miyakojima Island.
- The line of the Baal Hamaor runs through Changchun, China a city of 7 million. According to the Chazon Ish, graira would mean the line does not split the city.
- Are islands on Lake Argyle, that are 100 miles inland but with a river leading to the ocean included in graira using the Chazon Ish’s line? According to Rabbi Heber the river would “not ruin graira“, and such islands would be included. Would you say the same thing for French and Phillip Islands near Melbourne, Australia? Rabbi Heber is of the opinion that one should be machmir on these islands.
- Clarity about exactly what parts of the Philippines are on the other side of the date line. Some say it is better not to travel to the Philippines due to questions of the placement of the Baal Hamaor/Chazon Ish line, but the date line map clarifies any ambiguities about this part of the world.
Additional Reading
- Taarich Yisrael תאריך ישראל by Rabbi Yisroel Taplin
- Kitzur Taarich Yisroel / The Date Line in Halacha by Reb Zalman (Solly) Tropper
- Yisroel Vehazmanim ישראל והזמנים Vol II Chapter 13 קו התאריך by Rabbi Yisroel Dovid Harfenes
- A Traveler’s Guide To The International Date Line by Rabbi Dovid Heber
- Crossing the Dateline by Rabbi Mordechai Kuber
- סופה וסערה vol. 2 – ?השבת ביפן – היכן עובר קו התאריך ההלכתי by Rabbi Chanoch Tobias
- The International Date Line and Related Issues by David Pahmer
- קו התאריך בהלכה in the Hebrew Wikipedia
- פולמוס השבת ביפן in the Hebrew Wikipedia
- Various articles in the הערות וביאורים journal
- מקצה הארץ by Rav Yosef Taub
I would like to thank Rabbi Dovid Heber for the input and assistance in preparing this post.