<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>KosherJava</title>
	<atom:link href="http://www.kosherjava.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kosherjava.com</link>
	<description>A weblog about Zmanim, Kosher Coffee (Kosher Java) and other odds &#38; ends</description>
	<lastBuildDate>Tue, 01 May 2012 01:39:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>The Halachic Date Line Map</title>
		<link>http://www.kosherjava.com/2012/03/25/the-halachic-date-line-map/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-halachic-date-line-map</link>
		<comments>http://www.kosherjava.com/2012/03/25/the-halachic-date-line-map/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 03:24:03 +0000</pubDate>
		<dc:creator>KosherJava</dc:creator>
				<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[Zmanim]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[International Dateline]]></category>
		<category><![CDATA[Jewish Calendar]]></category>
		<category><![CDATA[Jewish date]]></category>
		<category><![CDATA[Latitude and Longitude]]></category>

		<guid isPermaLink="false">http://www.kosherjava.com/?p=1424</guid>
		<description><![CDATA[The international dateline is an internationally agreed upon, arbitrarily selected, line that demarcates one calendar day from the next. This line is about 180&#176; 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 [...]]]></description>
			<content:encoded><![CDATA[<iframe style="float: left; margin: 10px;" src="/maps/dateline.html?lat=0&#038;lng=75&#038;zoom=1&#038;legend=n" height="400" width="610" frameborder="0"></iframe>
The <a href="http://en.wikipedia.org/wiki/International_Date_Line">international dateline</a> is an internationally agreed upon, arbitrarily selected, line that demarcates one calendar day from the next. This line is about 180&deg; from <a href="http://en.wikipedia.org/wiki/Royal_Observatory,_Greenwich">Greenwich</a> 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 <a href="http://en.wikipedia.org/wiki/Halacha">halachic</a> dateline is a complex subject with various opinions. See <a href=" http://www.star-k.org/cons-abou-support.htm">Rabbi Dovid Heber&#8217;s</a> excellent article <a href="http://www.star-k.org/kashrus/kk-trav-dateline.htm">A Traveler&#8217;s Guide to the International Dateline</a> in the <a href="http://www.star-k.org/cons-kash.htm">Star-K Kashrus Kurrents</a> for additional information. This line changes from time to time, as countries decide to change from one side of the dateline to the other. The most recent change was when <a href="http://en.wikipedia.org/wiki/International_Date_Line#Samoan_Islands_and_Tokelau">Samoa shifted to the west of the line</a> at the end of 2011. Discussing the Samoa change in a December 29th, 2011 Yeshiva World article <a href="http://www.theyeshivaworld.com/article.php?p=113307">How to Keep This Shabbos in Samoa?</a>, Rabbi Dovid Heber stated that <blockquote>According to almost all opinions, the halachic Dateline is not determined by what the locals call &#8220;Saturday&#8221; and therefore, the fact that Samoa changes the Dateline does not change when we keep Shabbos.</blockquote> 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 Dateline. As an example see <a href="http://en.wikipedia.org/wiki/Yisroel_Taplin">Rabbi Yisroel Taplin</a>&#8216;s sefer <a href="http://www.worldcat.org/oclc/122738811">Taarich Yisrael תאריך ישראל</a> 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 <b><a href="http://www.kosherjava.com/maps/dateline.html">Halachic Dateline Map</a></b> 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 <a href="http://www.kosherjava.com/maps/sandbox/dateline.html?lat=11.51&#038;lng=-237.37&#038;zoom=6">zoomed in to the Philippines</a> for example).

<br /><h2>Location of the Halachic Date Line</h2>
There are various opinions about the location of the halachic date line. The three main opinions of the location of the halachic dateline are:
<ol>
<li>The <a href="http://en.wikipedia.org/wiki/Chazon_Ish">Chazon Ish</a> quoting the <a href="http://en.wikipedia.org/wiki/Kuzari">Kuzari</a> and the <a href="http://en.wikipedia.org/wiki/Zerachiah_ha-Levi_of_Girona">Baal Hamaor</a> who state that the date line is 90&deg; east of the Har Habayis.</li>
<li><a href="http://he.wikipedia.org/wiki/%D7%99%D7%97%D7%99%D7%90%D7%9C_%D7%9E%D7%99%D7%9B%D7%9C_%D7%98%D7%95%D7%A7%D7%A6%D7%99%D7%A0%D7%A1%D7%A7%D7%99">Rabbi Yechiel Michel Tucazinsky</a> (author of the Gesher Hachaim) who wrote the <a href="http://www.hebrewbooks.org/9061">היומם בכדור הארץ Hayomam Bekadur Haaretz</a> stating his opinion that the date line is 180&deg; east (or west) of Har Habayis. Among those agreeing with this opinion is <a href="http://en.wikipedia.org/wiki/Yosef_Shalom_Eliashiv">Rabbi Elyashiv</a>. 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 <a href="http://www.kosherjava.com/tag/rhumb-line/">rhumb line</a> method). A person located west of the line will daven westward, and a person east of the line will daven eastwards. See the <a href="http://www.kosherjava.com/maps/zmanim.html?lat=-27.778&#038;lng=-144.7646&#038;zoom=3&#038;z=n">Bearing to Yerushalayim Map</a> 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 <a href="http://en.wikipedia.org/wiki/Antipodes">antipodal point</a> of the Har Habayis.</li>
<li><a href="http://en.wikipedia.org/wiki/Menachem_Mendel_Kasher">Rabbi Menachem Mendel Kasher</a> in his <a href="www.worldcat.org/oclc/35724823">קו התאריך הישראלי Kav Hattarich Hayisraeli</a> is of the opinion that the international dateline is used. Among those agreeing with this opinion was <a href="http://en.wikipedia.org/wiki/Isser_Zalman_Meltzer">Rabbi Isser Zalman Meltzer</a>.</li>
</ol>
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, Korea and Australia that are split by the Kuzary and Baal Hamaor&#8217;s line (see the map above). The Chazon Ish brings the opinion of the <a href="http://en.wikipedia.org/wiki/Isaac_Israeli_ben_Joseph">Yesod Olam</a> (a disciple of the <a href="http://en.wikipedia.org/wiki/Asher_ben_Yehiel">Rosh</a>) that when the line intersects dry land, the line is extended eastward (or on occasion westward according to the 180&deg; opinion). This extension is referred to as &#8220;Graira&#8221;, where the land to the west &#8220;drags&#8221; the land it is attached to, to within the line. In the map, both the 90&deg; (Chazon Ish) and 180&deg; (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 <a href="http://en.wikipedia.org/wiki/David_ben_Solomon_ibn_Abi_Zimra">Radvaz</a>. According to the <a href="http://en.wikipedia.org/wiki/David_Kimhi">Radak</a> the center of the Dome of the Rock is the location of the Mizbeach, and the Kodesh Kodashim is 101 <a href="http://en.wikipedia.org/wiki/Cubit">amos</a> (about 54 meters / 180 feet) west of this point. According to the Radak the international dateline would be 101 amos west of the lines in the map.

<br /><h2>How the Map Works</h2>
The <b><a href="http://www.kosherjava.com/maps/dateline.html">Halachic Dateline Map</a></b> works like any other Google Map. You can zoom into any area to see a close-up. Clicking on the lines and shaded in &#8220;Graira&#8221; areas will provide some details about it. The map will show a very clear and exact position of the halachic dateline according to different halachic opinions.
Interesting points on the map include:
<ul>
<li><a href="http://www.kosherjava.com/maps/dateline.html?lat=-16.8707&#038;lng=215.1382&#038;zoom=12&#038;type=hybrid">Tahania Atoll</a>, a small <a href="http://en.wikipedia.org/wiki/Atoll">atoll</a> in <a href="http://en.wikipedia.org/wiki/French_Polynesia">French Polynesia</a> that is intersected by Rabbi Tucazinsky&#8217;s line. To the south of this point is the island of <a href="http://en.wikipedia.org/wiki/Rapa_Iti">Rapa Iti</a>. There is an interesting Halachic phenomenon at this location with Kiddush Levana in December 2027. See Rabbi Heber&#8217;s Sefer <a href="www.worldcat.org/oclc/461326125">Shaarei Zemanim שערי זמנים</a>. Rabbi Heber graciously allowed me to post <a href="http://www.kosherjava.com/files/Shaarei_Zemanim_4.pdf" target="_blank">סימן ד&#1523; &#8211; קונטרס זמן קידוש לבנה</a> 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.</li>
<li><a href="http://www.kosherjava.com/maps/dateline.html?lat=24.9306&#038;lng=-234.7359&#038;zoom=14">Ikema Island</a> is intersected by the Baal Hamaor&#8217;s line. According to the Chazon Ish &#8220;Graira&#8221; covers the entire <a href="http://en.wikipedia.org/wiki/Ikema_Island">Ikema Island</a>, but would not (according to Rabbi Dovid Heber of the Star-K) extend over the bridge to <a href="http://en.wikipedia.org/wiki/Miyako-jima">Miyakojima Island</a>.</li>
<li>The line of the Baal Hamaor runs through <a href="http://www.kosherjava.com/maps/dateline.html?lat=43.9010&#038;lng=125.2351&#038;zoom=19&#038;type=hybrid">Changchun, China</a> a  city of 7 million. According to the Chazon Ish, &#8220;Graira&#8221; would mean the line does not split the city.</li>
<li>Are islands on <a href="http://www.kosherjava.com/maps/dateline.html?lat=-16.2889&#038;lng=128.7644&#038;zoom=11">Lake Argyle</a>, a 100 miles inland but with a river leading to the ocean included in Graira using the Chazon Ish&#8217;s line? According to Rabbi Heber the river would &#8220;not ruin graira&#8221;, and such islands would be included. Would you say the same thing for <a href="http://www.kosherjava.com/maps/dateline.html?lat=-38.498&#038;lng=145.473&#038;zoom=10">French and Phillip Islands</a> near Melbourne, Australia? Rabbi Heber is of the opinion that one should be <em>machmir</em> on these islands.</li>
<li>Clarity about exactly what parts of the <a href="http://www.kosherjava.com/maps/dateline.html?lat=7.312&#038;lng=126.874&#038;zoom=6">Philippines</a> 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 dateline map clarifies ambiguities about this part of the world.</li>
</ul>

<br /><h2>Additional Reading</h2>
<ul>
<li><a href="www.worldcat.org/oclc/122738811">Taarich Yisrael תאריך ישראל</a> by Rabbi Yisroel Taplin</li>
<li><a href="www.worldcat.org/oclc/20146883">Yisroel Vehazmanim ישראל והזמנים</a> Vol II Chapter 13 קו התאריך by <a href="http://en.wikipedia.org/wiki/Yisroel_Dovid_Harfenes">Rabbi Yisroel Dovid Harfenes</a></li>
<li><a href="http://www.star-k.org/kashrus/kk-trav-dateline.htm">A Traveler&#8217;s Guide To The International Dateline</a> by Rabbi Dovid Heber.</li>
<li><a href="http://www.scribd.com/doc/31168345/">The International dateline and Related Issues</a> by David Pahmer.</li>
<li><a href="http://he.wikipedia.org/wiki/%D7%A7%D7%95_%D7%94%D7%AA%D7%90%D7%A8%D7%99%D7%9A_%D7%91%D7%94%D7%9C%D7%9B%D7%94">קו התאריך בהלכה</a> in the Hebrew Wikipedia</li>
<li><a href="http://he.wikipedia.org/wiki/%D7%A4%D7%95%D7%9C%D7%9E%D7%95%D7%A1_%D7%94%D7%A9%D7%91%D7%AA_%D7%91%D7%99%D7%A4%D7%9F">פולמוס השבת ביפן</a> in the Hebrew Wikipedia</li>
<li><a href="https://www.google.com/search?q=%22%D7%A7%D7%95+%D7%94%D7%AA%D7%90%D7%A8%D7%99%D7%9A%22+site%3Ahaoros.com">Various articles</a> in the Haoros journal</li>
</ul>

I would like to thank Rabbi Dovid Heber for the input and assistance in preparing this post. 
]]></content:encoded>
			<wfw:commentRss>http://www.kosherjava.com/2012/03/25/the-halachic-date-line-map/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KosherJava Zmanim API Powering Many Mobile Apps</title>
		<link>http://www.kosherjava.com/2012/03/06/kosherjava-zmanim-api-powering-in-many-mobile-apps/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=kosherjava-zmanim-api-powering-in-many-mobile-apps</link>
		<comments>http://www.kosherjava.com/2012/03/06/kosherjava-zmanim-api-powering-in-many-mobile-apps/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 01:08:20 +0000</pubDate>
		<dc:creator>KosherJava</dc:creator>
				<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[Zmanim]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[Zmanim API]]></category>

		<guid isPermaLink="false">http://www.kosherjava.com/?p=779</guid>
		<description><![CDATA[In the past I posted about Android Zmanim, Jay Gindin&#8217;s open source zmanim project that uses the KosherJava Zmanim API. The fact that Android development uses Java natively means that it is very simple for Android developers to include zmanim in their apps. Since that time there have been a number of other applications (including [...]]]></description>
			<content:encoded><![CDATA[<a href="http://www.kosherjava.com/images/mobileUsingKosherJava.png" target="_blank"><img class="alignleft" src="/images/mobileUsingKosherJava_thumb.png" alt="Mobile apps using Kosher Java Zmanim API"/></a>In the past I <a href="http://www.kosherjava.com/2010/04/19/android-zmanim-using-the-zmanim-api/">posted about Android Zmanim</a>, Jay Gindin&#8217;s open source <a href="http://code.google.com/p/android-zmanim">zmanim project</a> that uses the <a href="http://www.kosherjava.com/zmanim-project/">KosherJava Zmanim API</a>. The fact that Android development uses Java natively means that it is very simple for Android developers to include zmanim in their apps. Since that time there have been a number of other applications (including iPhone apps) using the code. Moshe&#8217;s <a href="https://github.com/MosheBerman/KosherCocoa/">KosherCocoa</a> Obj-C port of the KosherJava Zmanim API will probably result in additional iPhone apps that use the API. <a href="http://twitter.com/yitzchok">Yitzchok&#8217;s</a> older <a href="http://github.com/Yitzchok/Zmanim/"> Zmanim .NET</a> <a href="http://www.kosherjava.com/2010/04/20/zmanim-api-ported-to-net-c/">port of the KosherJava Zmanim API</a> also opened the door for <a href="http://www.microsoft.com/windowsphone">Windows Phone</a> zmanim applications as well (Ari Polski&#8217;s <a href="http://www.windowsphone.com/en-US/apps/cc179c64-3949-e011-854c-00237de2db9e">Zmaim app</a> already uses it, and there are others in the works). I may post additional details about some of them in the future, including an updated post about Jay&#8217;s latest Android Zmanim release. I am aware of the following mobile applications that use the KosherJava Zmanim API. 
<ul>
  <li><a href="http://code.google.com/p/android-zmanim/">Android Zmanim</a> (<a href="https://market.android.com/details?id=com.gindin.zmanim.android">Android</a>)</li>
  <li><a href="http://kosherdev.com">YahrtzeitZmanim</a> (<a href="https://market.android.com/details?id=com.mb.yartzeitzmanim">Android</a>)</li>
  <li><a href="http://www.windowsphone.com/en-US/apps/cc179c64-3949-e011-854c-00237de2db9e">Zmanim</a> (Windows Phone)</li>
  <li><a href="http://www.rustybrick.com/iphone-siddur.php">Siddur</a> (RustyBrick) (iPhone)</li>
  <li><a href="http://m-minyan.com">mMinyan</a> (for both <a href="https://market.android.com/details?id=com.mminyan.mminyan">Android</a> and iPhone)</li>
  <li><a href="https://market.android.com/details?id=com.jnc.zmanminder">ZmanimMinder</a> (Android)</li>
  <li><a href="https://market.android.com/details?id=il.avimak.Minyan">Find a Minyan</a> (Android)</li>
  <li><a href="http://www.torahbloj.com">Siddur</a> (OKTM) (<a href="https://market.android.com/details?id=com.oktmwebsites.hebsiddur">Android</a>)</li>
  <li><a href="http://www.crowdedroad.com/Jewish-Cal">Jewish Cal</a> (iPhone)</li>
  <li><a href="https://market.android.com/details?id=com.karriapps.smartsiddur">Smart Siddur</a> (Android)</li>
  <li><a href="http://apps.mosheberman.com/">Zmanim</a> (iPhone)</li>
  <li><a href="http://mosheberman.com">Ultimate Omer 2</a> (<a href="http://itunes.com/apps/mosheberman/sefira">iPhone</a>)</li>
  <li><a href="https://market.android.com/details?id=com.turel">Sefirat Haomer</a> (Android)</li>
  <li><a href="http://www.rustybrick.com/iphone-shabbat.php">Shabbat Shalom</a> (<a href="https://market.android.com/details?id=com.rustybrick.shabbat">Android</a> and iPhone)</li>
  <li><a href="http://www.dakatora.co.il/">Daka Tora</a> (<a href="https://play.google.com/store/apps/details?id=com.eladrich.dakatora">Android</a>) an app for Jewish soldiers</li>
  <li><a href="http://itunes.apple.com/us/app/mincha-alerts-automatic-prayer/id478676714">Mincha Alerts</a> (iPhone)</li>
</ul>
There are also a few secular apps that are non-zmanim specific that use the API for sunrise and sunset calculations. One that I know of is <a href="http://zerocredibility.wordpress.com/about/">Jeffrey Blattman&#8217;s</a> <a href="http://market.android.com/details?id=org.jtb.d2d">Dawn to Dusk Widget</a>, and I know that there are some photography apps that use it for sunrise/set calculations as well.  There are likely more that I have missed, and a few that are in active development but unreleased. If you are aware of any missed apps, please <a href="http://www.kosherjava.com/contact/">let me know</a>.
]]></content:encoded>
			<wfw:commentRss>http://www.kosherjava.com/2012/03/06/kosherjava-zmanim-api-powering-in-many-mobile-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FAQ: Outputting Zmanim for A Different Time Zone With the the Zmanim API</title>
		<link>http://www.kosherjava.com/2011/11/08/outputting-zmanim-for-a-different-time-zone-with-the-the-zmanim-api/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=outputting-zmanim-for-a-different-time-zone-with-the-the-zmanim-api</link>
		<comments>http://www.kosherjava.com/2011/11/08/outputting-zmanim-for-a-different-time-zone-with-the-the-zmanim-api/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 05:01:03 +0000</pubDate>
		<dc:creator>KosherJava</dc:creator>
				<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[Zmanim]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Bugs]]></category>
		<category><![CDATA[Timezone]]></category>

		<guid isPermaLink="false">http://www.kosherjava.com/?p=1349</guid>
		<description><![CDATA[Question:Why does the output of zmanim for a different time zone appear incorrect?Answer: One of the common issues encountered by developers using the API is that zmanim generated for a different time zone than the user&#8217;s time zone may return output that appears incorrect. For example a user in Lakewood, NJ trying to calculate sunrise [...]]]></description>
			<content:encoded><![CDATA[<img class="alignleft" src="/images/coffeeQuestion.jpg" alt="Zmanim API FAQ"/><h2>Question:</h2>Why does the output of zmanim for a different time zone appear incorrect?<h2>Answer:</h2>
One of the common issues encountered by developers using the API is that zmanim generated for a different time zone than the user&#8217;s time zone may return output that appears incorrect. For example a user in Lakewood, NJ trying to calculate sunrise for Yerushalayim may attempt to use the following code:

<pre class="brush: java; title: ; notranslate">
String locationName = &quot;Jerusalem&quot;;
double latitude = 31.778; // Har habayis
double longitude = 35.2354;// Har Habayis
double elevation = 0;
TimeZone timeZone = TimeZone.getTimeZone(&quot;Asia/Jerusalem&quot;);
GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);
ZmanimCalendar zc = new ZmanimCalendar(location);
zc.getCalendar().set(2011, Calendar.FEBRUARY, 8);
System.out.println(&quot;Sunrise: &quot; + zc.getSunrise());
System.out.println(&quot;Sunset: &quot; + zc.getSunset());
</pre>

While you would expect a <a href="http://www.kosherjava.com/maps/zmanim.html?lat=31.778&#038;lng=35.2354&#038;zoom=19&#038;date=2011-2-8">sunrise of 6:27:41 AM and sunset of 5:19:19 PM</a>, running this code on a computer anywhere in the Eastern Standard time zone would generate the following time that appears to be 7 hours early:
<pre class="brush: plain; title: ; notranslate">
Sunrise: Mon Feb 07 23:27:41 EST 2011
Sunset: Tue Feb 08 10:19:19 EST 2011
</pre>

The issue is simple, and the sunrise and sunset returned above are actually accurate. Zmanim are returned by the Zmanim API as a Java <a href="http://download.oracle.com/javase/7/docs/api/java/util/Date.html">Date object</a> that represents a moment in time (stored internally by Java as <a href="http://en.wikipedia.org/wiki/Unix_time">Unix Time</a> &#8211; the number of milliseconds since the January 1, 1970 GMT). Sunrise in Yerushalayim on February 8th actually happens at 11:27:41 PM on February 7th <b>EST</b>. Java is simply outputting the <a href="http://download.oracle.com/javase/7/docs/api/java/util/Date.html#toString%28%29">Date as a String</a> formatted to the users default time zone (EST in this example). The user probably intends to output the time in IST &#8211; Israel Standard Time (&#8220;Asia/Jerusalem&#8221; in the Olson database). To do this you have to output the zmanim using a formatter set to use the &#8220;Asia/Jerusalem&#8221; time zone.

<pre class="brush: java; title: ; notranslate">
DateFormat zmanimFormat = new SimpleDateFormat(&quot;EEE MMM dd HH:mm:ss z yyyy&quot;);
zmanimFormat.setTimeZone(location.getTimeZone());

System.out.println(&quot;sunrise: &quot; + zmanimFormat.format(zc.getSunrise()));
System.out.println(&quot;sunset:&quot; + zmanimFormat.format(zc.getSunset()));
</pre>
will output the expected
<pre class="brush: plain; title: ; notranslate">
sunrise: Tue Feb 08 06:27:41 IST 2011
sunset:Tue Feb 08 17:19:19 IST 2011
</pre>

Below is the full code example. 

<pre class="brush: java; highlight: [16,17,18,19]; title: ; notranslate">
import net.sourceforge.zmanim.*;
import net.sourceforge.zmanim.util.*;
import java.util.TimeZone;
public class FormatZmanim{
	public static void main(String [] args) {
		String locationName = &quot;Jerusalem&quot;;
		double latitude = 31.778; //latitude of Har habayis
		double longitude = 35.2354; //longitude of Har Habayis
		double elevation = 0; //optional elevation
		//use a Valid Olson Database timezone listed in java.util.TimeZone.getAvailableIDs()
		TimeZone timeZone = TimeZone.getTimeZone(&quot;Asia/Jerusalem&quot;);
		//create the location object
		GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);
		ZmanimCalendar zc = new ZmanimCalendar(location); //create the ZmanimCalendar
		zc.getCalendar().set(2011, Calendar.FEBRUARY, 8); //set the date
		DateFormat zmanimFormat = new SimpleDateFormat(&quot;EEE MMM dd HH:mm:ss z yyyy&quot;); //Create the formatter
		zmanimFormat.setTimeZone(location.getTimeZone()); //set the formatter's time zone
		System.out.println(&quot;sunrise: &quot; + zmanimFormat.format(zc.getSunrise()));
		System.out.println(&quot;sunset:&quot; + zmanimFormat.format(zc.getSunset()));
	}
}
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.kosherjava.com/2011/11/08/outputting-zmanim-for-a-different-time-zone-with-the-the-zmanim-api/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Bearing to Yerushalayim and Zmanim Map 3.0</title>
		<link>http://www.kosherjava.com/2011/09/11/bearing-to-yerushalayim-and-zmanim-map-3-0/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bearing-to-yerushalayim-and-zmanim-map-3-0</link>
		<comments>http://www.kosherjava.com/2011/09/11/bearing-to-yerushalayim-and-zmanim-map-3-0/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 01:53:34 +0000</pubDate>
		<dc:creator>KosherJava</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[Zmanim]]></category>
		<category><![CDATA[Davening]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Great Circle]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Latitude and Longitude]]></category>
		<category><![CDATA[Rhumb Line]]></category>
		<category><![CDATA[Timezone]]></category>

		<guid isPermaLink="false">http://www.kosherjava.com/?p=1298</guid>
		<description><![CDATA[The Bearing to Yerushalayim and Zmanim Map was recently updated to version 3.0. This new release adds a number of new features to the Zmanim Map version 2.0 update released in March 2010. The main change was updating the Google Map API version from the deprecated v2 to v3. This change increases performance and adds [...]]]></description>
			<content:encoded><![CDATA[<img class="alignleft" src="/images/sepiaMap.jpg" alt="World map" title="World map" />The <a href="http://www.kosherjava.com/maps/zmanim.html">Bearing to Yerushalayim and Zmanim Map</a> was recently updated to version 3.0. This new release adds a number of new features to the <a href="http://www.kosherjava.com/2010/03/14/bearing-to-yerushalayim-and-zmanim-map-2-0/">Zmanim Map version 2.0 update</a> released in March 2010. The main change was updating the Google Map API version from the deprecated <a href="http://code.google.com/apis/maps/documentation/javascript/v2/">v2</a> to <a href="http://code.google.com/apis/maps/documentation/javascript/">v3</a>. This change increases performance and adds much better support for mobile browsers. The upgrade also means that a Google Maps API key is no longer required. This makes it easy to drop it into any site without any configuration (<a href="http://www.kosherjava.com/contact/">contact me</a> for details). <img class="alignright" src="/images/zmanimTabV3.png" alt="Zmanim tab v3" title="Zmanim tab v3" />The technical notes on the original <a href="http://www.kosherjava.com/2008/04/07/technical-information-about-the-bearing-to-yerushalayim-map/">Technical Information about the Bearing to Yerushalayim Map</a> post are still relevant, with very little having changed since the initial implementation. 

The following is a partial list of the new features:
<ul>
<li>A number of additional zmanim in the More Zmanim tab, including <a href="http://www.kosherjava.com/zmanim/docs/api/net/sourceforge/zmanim/ComplexZmanimCalendar.html#getTchilasZmanKidushLevana3Days()">tchilas</a> and <a href="http://www.kosherjava.com/zmanim/docs/api/net/sourceforge/zmanim/ComplexZmanimCalendar.html#getSofZmanKidushLevanaBetweenMoldos()">sof zman kiddush levana</a> (if they occur on that day)
</li><li>A link to download a 12 month Zmanim calendar directly from the map (using the same spreadsheet used in the <a href="http://www.kosherjava.com/zmanim-project/zmanim-calendar-generator/">Zmanim Calendar Generator</a>). Clicking on the link from the Zmanim tab will generate a calendar with most typically used zmanim, while clicking on the link in the More Zmanim tab will download the full set of zmanim. These are available as the Calendar Type option in the Zmanim Calendar Generator</li>
<li>Increased use of <a href="http://jquery.com/">jQuery</a> and jQuery UI for formatting the zmanim tables to better match the site look &amp; feel</li>
<li>Refactoring to make the code more robust and slightly more maintainable</li>
<li>Timezones for all of Israel now display the timezone of Asia/Jerusalem as opposed to the Asia/Gaza returned for parts of Israel by the <a href="http://www.geonames.org/export/web-services.html">GeoNames TimeZone web service</a></li>
</ul>

From a technical perspective there were a number of changes required due to updating the Google Maps API from v2 to v3. These include:

<ul>
<li>v3 no longer supports <a href="http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.openInfoWindowTabs">tabbed info windows</a>, so the tabs are now implemented using <a href="http://jqueryui.com/">jQuery UI</a></li>
<li>Renaming of a number of classes and functions such as GLatLng to LatLng</li>
<li>A number of functions that were part of API v2 were removed in v3. One example is the removal of <a href="http://en.wikipedia.org/wiki/Radian">radians</a> in the LatLng that had been available as <a href="http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GLatLng.latRadians">GLatLng.latRadians()</a>. These missing functions required for the direction to Yerushalayim calculations are now supported in the Zmanim Map using <a href="http://en.wikipedia.org/wiki/JavaScript#Prototype-based">prototypes</a></li>
</ul>


]]></content:encoded>
			<wfw:commentRss>http://www.kosherjava.com/2011/09/11/bearing-to-yerushalayim-and-zmanim-map-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zmanim API Ported to Cocoa / Objective-C</title>
		<link>http://www.kosherjava.com/2011/07/29/zmanim-api-ported-to-cocoa-objective-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=zmanim-api-ported-to-cocoa-objective-c</link>
		<comments>http://www.kosherjava.com/2011/07/29/zmanim-api-ported-to-cocoa-objective-c/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 16:48:25 +0000</pubDate>
		<dc:creator>KosherJava</dc:creator>
				<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[Zmanim]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Cocoa API]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[port]]></category>

		<guid isPermaLink="false">http://www.kosherjava.com/?p=875</guid>
		<description><![CDATA[Moshe Berman completed the 2.0 release of his port of the KosherJava Zmanim API from Java to a Cocoa API using Objective-C. You can see the work in the KosherCocoa project page. The original work on the port dates back to Moshe&#8217;s iPhone Ultimate Omer 2 (iTunes link) app. In that app, he ported the [...]]]></description>
			<content:encoded><![CDATA[<img class="alignleft" src="/images/PortCityJava240.jpg" alt="Port City Java" title="Port City Java" /><a href="http://www.mosheberman.com">Moshe Berman</a> completed the 2.0 release of his port of the KosherJava <a href="http://www.kosherjava.com/zmanim-project/">Zmanim API</a> from Java to a <a href="http://en.wikipedia.org/wiki/Cocoa_%28API%29">Cocoa API</a> using <a href="http://en.wikipedia.org/wiki/Objective-C">Objective-C</a>. You can see the work in the <a href="https://github.com/MosheBerman/KosherCocoa">KosherCocoa</a> project page. The original work on the port dates back to Moshe&#8217;s iPhone <a href="http://mosheberman.com">Ultimate Omer 2</a> (<a href="http://itunes.com/apps/mosheberman/sefira">iTunes link</a>) app. In that app, he ported the minimum amount of code needed to calculate sunset in order to roll the day of the Omer after sunset. With Moshe&#8217;s latest check-in at <a href= "https://github.com">github</a>, he provided a port of a good portion of the API sticking to the basic design of the KosherJava API. The complexZmanimCalendar still remains to be ported, but the majority of zmanim in common use are in the ported ZmanimCalendar. Moshe&#8217;s blog post <a href="http://mosheberman.com/wordpress/2011/07/25/koshercocoa-2-0/">Introducing KosherCocoa 2.0</a> has additional details. Additional developer notes can be seen in the <a href="https://github.com/MosheBerman/KosherCocoa/wiki">KosherCocoa wiki page</a>. This port will be a boon to <a href="http://en.wikipedia.org/wiki/IOS_%28Apple%29">iOS</a> developers who now have a simple way to include zmanim in their iPhone and iPad apps.
Here is some sample code that outputs zmanim to the <a href="http://en.wikipedia.org/wiki/Console_%28Mac_OS_X%29">console</a>.

<h3>Zmanim.m</h3>
<pre class="brush: objc; highlight: [24,25,26,27]; title: ; notranslate">
#import &lt;Foundation/Foundation.h&gt;
#import &quot;ZmanimCalendar.h&quot;

int main (int argc, const char * argv[]){

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

    //  Set up the location
    NSString *locationName = @&quot;Lakewood, NJ&quot;;
    double latitude = 40.096; //Lakewood, NJ
    double longitude = -74.222; //Lakewood, NJ
    NSTimeZone *timeZone = [NSTimeZone timeZoneForSecondsFromGMT:-18000];

    //  Initialize the Zmanim Calendar
    GeoLocation *geoLocation = [[GeoLocation alloc] initWithName:locationName andLatitude:latitude andLongitude:longitude andTimeZone:timeZone];
    ZmanimCalendar *zmanimCalendar = [[ZmanimCalendar alloc] initWithLocation:geoLocation];

    //  Create a Formatter for the date information
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    [formatter setTimeZone:timeZone];
    [formatter setDateStyle:NSDateFormatterNoStyle];
    [formatter setTimeStyle:NSDateFormatterMediumStyle];

    NSDate *sunrise = [zmanimCalendar sunrise];
    NSDate *sofZmanShmaMGA = [zmanimCalendar sofZmanShmaMogenAvraham];
    NSDate *sofZmanShmaGRA = [zmanimCalendar sofZmanShmaGra];
    NSDate *sunset = [zmanimCalendar sunset];

    NSLog(@&quot;Today's Zmanim for %@&quot;,  [geoLocation locationName]);
    NSLog(@&quot;Sunrise: %@&quot;,  [formatter stringFromDate:sunrise]);
    NSLog(@&quot;Sof Zman Shema MGA: %@&quot;,  [formatter stringFromDate:sofZmanShmaMGA]);
    NSLog(@&quot;Sof Zman Shema GRA: %@&quot;,  [formatter stringFromDate:sofZmanShmaGRA]);
    NSLog(@&quot;Sunset: %@&quot;,  [formatter stringFromDate:sunset]);

    [pool drain];
    return 0;
}
</pre>

This would output (on February 8th):
<pre class="brush: plain; title: ; notranslate">
Today's Zmanim for Lakewood, NJ
Sunrise: 6:58:43 AM
Sof Zman Shema MGA: 8:59:04 AM
Sof Zman Shema GRA: 9:35:04 AM
Sunset: 5:24:09 PM
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.kosherjava.com/2011/07/29/zmanim-api-ported-to-cocoa-objective-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculating Kiddush Levana Times Using the Zmanim API</title>
		<link>http://www.kosherjava.com/2011/05/20/calculating-kiddush-levana-times/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=calculating-kiddush-levana-times</link>
		<comments>http://www.kosherjava.com/2011/05/20/calculating-kiddush-levana-times/#comments</comments>
		<pubDate>Fri, 20 May 2011 22:43:43 +0000</pubDate>
		<dc:creator>KosherJava</dc:creator>
				<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[Zmanim]]></category>
		<category><![CDATA[Alpha]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Hebrew Date]]></category>
		<category><![CDATA[Jewish Calendar]]></category>
		<category><![CDATA[Jewish date]]></category>
		<category><![CDATA[Kiddush Levana]]></category>
		<category><![CDATA[Molad]]></category>

		<guid isPermaLink="false">http://www.kosherjava.com/?p=978</guid>
		<description><![CDATA[Calculating the earliest and latest times for Kiddush Levana has not been part of the KosherJava Zmanim API until now. This is because unlike other zmanim that solely rely on solar calculations that are tied to the Gregorian calendar, times for Kiddush Levanah depend on the Jewish calendar molad (lunar conjunction) computation. With the recent [...]]]></description>
			<content:encoded><![CDATA[<img class="alignleft" src="/images/moonCrescent3DayLunation.jpg" alt="Moon Crescent 3 Day Lunation"/>Calculating the earliest and latest times for <a href="http://en.wikipedia.org/wiki/Kiddush_levana">Kiddush Levana</a> has not been part of the KosherJava <a href="http://www.kosherjava.com/zmanim-project/">Zmanim API</a> until now. This is because unlike other zmanim that solely rely on solar calculations that are tied to the <a href="http://en.wikipedia.org/wiki/Gregorian_calendar">Gregorian calendar</a>, times for Kiddush Levanah depend on the Jewish calendar <a href="http://en.wikipedia.org/wiki/Molad">molad (lunar conjunction)</a> computation. With the recent addition of Jewish calendar support to the <a href="https://code.google.com/p/kosherjava/">alpha releases</a> of the KosherJava Zmaim API 1.3, molad calculation was added, allowing for calculation of kidush levana times. Times include the earliest time calculated as 3 and 7 days after the molad. Sof zman kidush levanah includes the <a href="http://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil&#8217;s</a> opinion that it is calculated as halfway between molad and molad, and the more lenient full 15 days from the molad mentioned by the <a href="http://en.wikipedia.org/wiki/Yosef_Karo">Mechaber</a> in the <a href="http://en.wikipedia.org/wiki/Shulchan_Aruch">Shulchan Aruch</a>. It should be noted that some opinions hold that the Rema who brings down the opinion of the Maharil&#8217;s of calculating half way between molad and molad is of the opinion that the Mechaber agrees with him. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi Dovid Heber&#8217;s very detailed writeup in Siman Daled (chapter 4) of  <a href="http://www.worldcat.org/oclc/461326125">Shaarei Zmanim</a>.
<h2>Calculating the Molad</h2>
Kidush levanah times depend on the time of the molad. The time of the molad announced in shuls on <a href="http://en.wikipedia.org/wiki/Shabbat_Mevarchim#Shabbat_Mevarchim">Shabbos Mevarchim</a> is the time of the Molad Emtzai (Average Molad) in Yerushalayim <a href="http://en.wikipedia.org/wiki/Local_mean_time">local mean time</a>. This has to be converted to <a href="http://en.wikipedia.org/wiki/Standard_time">standard time</a>. Standard time uses <a href="http://en.wikipedia.org/wiki/Time_zone">time zones</a> to unify clock times across a large area. With 360&deg; of <a href="http://en.wikipedia.org/wiki/Longitude">longitude</a> around the globe, the world is divided into 24 timezones (one per hour) resulting in timezones that are 15&deg; of longitude each. <a href="http://en.wikipedia.org/wiki/Temple_Mount">Har Habayis</a> with a longitude of <a href="http://www.kosherjava.com/maps/zmanim.html?lat=31.778&#038;lng=35.2354&#038;zoom=18&#038;type=h">35.2354&deg;</a> is 5.2354&deg; away from the 30&deg; longitude line. Multiply the 5.235&deg; by 4 minutes per degree (15&deg; of longitude per hour) to reach 20.94 minutes, or 20 minutes and 56.496 seconds (5.235 * 4 = 20.94). This time is subtracted from the local molad time to arrive at Standard time. Since the time of the molad is at the same instant globally (unlike zmanim such as sunrise that depend on a person&#8217;s location), converting this to a user&#8217;s local time involves simply calculating the time difference between the time in Yerushalayim and your location. If daylight savings time is in use, this has to be added to the calculation. Java <a href="">date formatting classes</a> do this calculation on <a href="http://download.oracle.com/javase/7/docs/api/java/util/Date.html">Date objects</a> without forcing the developer to do any calculations.

<h2>Calculating the Start and End of Kiddush Levana Times</h2>
The <a href="http://www.kosherjava.com/zmanim/docs/api/net/sourceforge/zmanim/hebrewcalendar/JewishCalendar.html">JewishCalendar</a> class contains the methods for claculating these zmanim. Calculating Tchilas Zman Kiddush Levana (the earliest time Kiddush Levana can be said) is done by <a href="http://www.kosherjava.com/zmanim/docs/api/net/sourceforge/zmanim/hebrewcalendar/JewishCalendar.html#getTchilasZmanKidushLevanah3Days%28int,%20int%29">adding 3 days</a> or <a href="http://www.kosherjava.com/zmanim/docs/api/net/sourceforge/zmanim/hebrewcalendar/JewishCalendar.html#getTchilasZmanKidushLevanah7Days%28int,%20int%29">7 days</a> to the <a href="http://www.kosherjava.com/zmanim/docs/api/net/sourceforge/zmanim/hebrewcalendar/JewishCalendar.html#getMoladAsDate%28int,%20int%29">molad time</a>. Sof Zman Kiddush Levana (the latest time Kiddush Levana can be said) is either the <a href="http://www.kosherjava.com/zmanim/docs/api/net/sourceforge/zmanim/hebrewcalendar/JewishCalendar.html#getSofZmanKidushLevanahBetweenMoldos%28int,%20int%29">time between molad and molad</a> calculated by adding 14 days, 18 hours, 22 minutes and 1.666 seconds to the molad (half the 29 days, 12 hours, 44 minutes and 1 chelek (3.333 seconds)), or by <a href="http://www.kosherjava.com/zmanim/docs/api/net/sourceforge/zmanim/hebrewcalendar/JewishCalendar.html#getSofZmanKidushLevanah15Days%28int,%20int%29">adding 15 days to the molad</a>.

<h2>Using the Zmanim API Calculate Molad Based Times</h2>
Here is sample code for calculating various kiddush levana times for anywhere in the world for Shevat 5729 (1969). Since formatting classes requires a timezone for proper formatting, the simple code below assumes that you are looking for the time in your local timezone. If you want the time for a timezone other than the one your computer is in, set the SimpleDateFormat.setTimeZone() to the timezone you wish to display the times for.
<pre class="brush: java; title: ; notranslate">
int year = 5729;
int month = JewishDate.SHEVAT;
Date tchilas3Days = JewishCalendar.getTchilasZmanKidushLevanah3Days(year, month);
Date tchilas7Days = JewishCalendar.getTchilasZmanKidushLevanah7Days(year, month);
Date sofZmanBetweenMoldos = JewishCalendar.getSofZmanKidushLevanahBetweenMoldos(year, month);
Date sofZmanKidushLevanah15Days = JewishCalendar.getSofZmanKidushLevanah15Days(year, month);
SimpleDateFormat sdf = new SimpleDateFormat(&quot;MMM dd, yyyy 'at' HH:mm:ss z&quot;);
System.out.println(&quot;Tchilas Zman Kiddush Levana 3 Days: &quot; + sdf.format(tchilas3Days));
System.out.println(&quot;Tchilas Zman Kiddush Levana 7 Days: &quot; + sdf.format(tchilas7Days));
System.out.println(&quot;Sof Zman Kiddush Levana Between Moldos: &quot; + sdf.format(sofZmanBetweenMoldos));
System.out.println(&quot;Sof Zman Kiddush Levana 15 Days: &quot; + sdf.format(sofZmanKidushLevanah15Days));
</pre>

this will output the following in an EST timezone.
<pre class="brush: plain; title: ; notranslate">
Tchilas Zman Kiddush Levana 3 Days: Jan 21, 1969 at 06:06:29 EST
Tchilas Zman Kiddush Levana 7 Days: Jan 25, 1969 at 06:06:29 EST
Sof Zman Kiddush Levana Between Moldos: Feb 02, 1969 at 00:28:31 EST
Sof Zman Kiddush Levana 15 Days: Feb 02, 1969 at 06:06:29 EST
</pre>

<h2>Kiddush Levana Times During Daylight Hours</h2>
As you can see, all of these times are at night (After tzais 72 and prior to Alos 72 minutes in Montreal). Many times, these calculations will result in times that are during daylight hours when Kidush Levana can&#8217;t be said. When using the API and calculating the time for the tchilas zman kiddush levana and the time is during daylight hours, the earliest time should be tzais the following night. When the calculated time of sof zman kiddush levana is during daylight hours, the time posted should be alos on the previous night. The API may at some point support a method of automatically calculating this.]]></content:encoded>
			<wfw:commentRss>http://www.kosherjava.com/2011/05/20/calculating-kiddush-levana-times/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KosherJava Zmanim API Released Under the LGPL License</title>
		<link>http://www.kosherjava.com/2011/05/09/kosherjava-zmanim-api-released-under-the-lgpl-license/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=kosherjava-zmanim-api-released-under-the-lgpl-license</link>
		<comments>http://www.kosherjava.com/2011/05/09/kosherjava-zmanim-api-released-under-the-lgpl-license/#comments</comments>
		<pubDate>Mon, 09 May 2011 20:43:23 +0000</pubDate>
		<dc:creator>KosherJava</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[Zmanim]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[GPL]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[LGPL]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[port]]></category>

		<guid isPermaLink="false">http://www.kosherjava.com/?p=879</guid>
		<description><![CDATA[Until this point the KosherJava Zmanim API has been released under the GPL V2.0 open source license. This had the effect of forcing any application written using the library to release it&#8217;s source code under the same license. Being that the Zmanim API is a library, the LGPL is a more appropriate license. The LGPL [...]]]></description>
			<content:encoded><![CDATA[<img class="alignleft" src="/images/lgpl.png" alt="LGPL"/>Until this point the <a href="http://www.kosherjava.com/zmanim-project/">KosherJava Zmanim API</a> has been released under the <a href="http://en.wikipedia.org/wiki/GNU_General_Public_License">GPL</a>  <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">V2.0</a> <a href="http://en.wikipedia.org/wiki/Open-source_license"> open source license</a>. This had the effect of forcing any application written using the library to release it&#8217;s source code under the same license. Being that the Zmanim <a href="http://en.wikipedia.org/wiki/API">API</a> is a <a href="http://en.wikipedia.org/wiki/Library_%28computing%29">library</a>, the <a href="http://en.wikipedia.org/wiki/LGPL">LGPL</a> is a more appropriate license. The LGPL allows developers to use the KosherJava Zmanim API, yet keep their application code <a href="http://en.wikipedia.org/wiki/Proprietary_software">closed source</a>. Only changes to the API itself (such as ports to different languages) would have to be released as open source. I had in the past on request released the source under the LGPL (the <a href="http://www.kosherjava.com/2010/04/20/zmanim-api-ported-to-net-c/">Zmanim API .NET port</a> has already been released under the LGPL with my permission), and with the recent 3/27/2011 <a href="http://www.kosherjava.com/2011/03/23/zmanim-api-in-svn/">SVN checkin</a> I formally changed the Java Zmanim API license to the <a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">LGPL 2.1</a> (not the newer <a href="http://www.gnu.org/copyleft/lesser.html">LGPL 3.0</a>). The next 1.3.0 release will be the first formal release under the LGPL. In one case the change to the license required permission from developer who wrote code used by the the Zmanim API, and this was done.]]></content:encoded>
			<wfw:commentRss>http://www.kosherjava.com/2011/05/09/kosherjava-zmanim-api-released-under-the-lgpl-license/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Calculating Erev Pesach Zmanim</title>
		<link>http://www.kosherjava.com/2011/04/14/calculating-erev-pesach-zmanim/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=calculating-erev-pesach-zmanim</link>
		<comments>http://www.kosherjava.com/2011/04/14/calculating-erev-pesach-zmanim/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 03:20:32 +0000</pubDate>
		<dc:creator>KosherJava</dc:creator>
				<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[Zmanim]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Jewish Calendar]]></category>
		<category><![CDATA[Pesach]]></category>

		<guid isPermaLink="false">http://www.kosherjava.com/?p=950</guid>
		<description><![CDATA[The Zmanim API did not have dedicated zmanim to claculate the Erev Pesach zmanim of sof zman achilas chametz (the latest time one can eat chametz), and sof zman biur chametz (the latest time to burn chametz) till the April 14 check in to the KosherJava Zmanim Project SVN repository. The latest time for eating [...]]]></description>
			<content:encoded><![CDATA[<img class="alignleft" src="/images/matzah.jpg" alt="Matzah"/>The Zmanim API did not have dedicated zmanim to claculate the Erev Pesach zmanim of <em>sof zman achilas <a href="http://en.wikipedia.org/wiki/Chametz">chametz</a></em> (the latest time one can eat chametz), and sof zman <a href="http://en.wikipedia.org/wiki/Chametz#Removal_of_chametz">biur chametz</a> (the latest time to burn chametz) till the <a href="https://code.google.com/p/kosherjava/source/detail?r=42">April 14 check in</a> to the <a href="https://code.google.com/p/kosherjava/">KosherJava Zmanim Project SVN repository</a>. The latest time for eating chametz is at the end of the 4th hour of the day. This corresponds to sof zman tfila. The API has about 12 of those, so that does not require any special programming, but to help developers who are unaware of how they work I created 3 wrapper getSofZmanAchilasChametz methods (<a href="http://www.kosherjava.com/zmanim/docs/api/net/sourceforge/zmanim/ComplexZmanimCalendar.html#getSofZmanAchilasChametzGRA%28%29">getSofZmanAchilasChametzGRA()</a>, <a href="http://www.kosherjava.com/zmanim/docs/api/net/sourceforge/zmanim/ComplexZmanimCalendar.html#getSofZmanAchilasChametzMGA72Minutes%28%29">getSofZmanAchilasChametzMGA72Minutes()</a> and <a href="http://www.kosherjava.com/zmanim/docs/api/net/sourceforge/zmanim/ComplexZmanimCalendar.html#getSofZmanAchilasChametzMGA16Point1Degrees%28%29">getSofZmanAchilasChametzMGA16Point1Degrees()</a>) calling the 3 most commonly used getSofZmanTfila methods (getSofZmanTfilaGRA(), getSofZmanTfilaMGA72Minutes() and getSofZmanTfilaMGA16Point1Degrees()). For example here is the exact code used in getSofZmanAchilasChametzGRA()
<pre class="brush: java; title: ; notranslate">
public Date getSofZmanAchilasChametzGRA() {
	return getSofZmanTfilaGRA();
}
</pre>

The API itself is very flexible, and as long as you know the calculation of the zman, you can easily calculate it. For example, to calculate sof zman biur chametz according to the <a href="http://en.wikipedia.org/wiki/Vilna_Gaon">GR&quot;A</a>, the time would be 5 shaos zmaniyos after sunrise. Using the Zmanim API this would be coded as:
<pre class="brush: java; title: ; notranslate">
Date SofZmanBiurChametzGra = getTimeOffset(getSeaLevelSunrise(), getShaahZmanisGra() * 5);
</pre> 
The exact code used in the API is:
<pre class="brush: java; title: ; notranslate">
public Date getSofZmanBiurChametzGRA() {
	return getTimeOffset(getSeaLevelSunrise(), getShaahZmanisGra() * 5);
}
</pre>
Developers who want to use the current API to generate these zmanim can use the following sample as a guide.
<pre class="brush: java; highlight: [11,12,13,14,15,16]; title: ; notranslate">
String locationName = &quot;Lakewood, NJ&quot;;
double latitude = 40.09596; //Lakewood, NJ
double longitude = -74.22213; //Lakewood, NJ
double elevation = 0; //optional elevation
TimeZone timeZone = TimeZone.getTimeZone(&quot;America/New_York&quot;);
GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);
ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location);
czc.getCalendar().set(Calendar.YEAR, 2011);
czc.getCalendar().set(Calendar.MONTH, Calendar.APRIL);
czc.getCalendar().set(Calendar.DAY_OF_MONTH, 18);
Date graAchilas = czc.getSofZmanTfilaGRA();
Date graBiur = czc.getTimeOffset(czc.getSeaLevelSunrise(), czc.getShaahZmanisGra() * 5);
Date mga72Achilas = czc.getSofZmanTfilaMGA72Minutes();
Date mga72Biur = czc.getTimeOffset(czc.getAlos72(), czc.getShaahZmanisMGA() * 5);
Date mga16Achilas = czc.getSofZmanTfilaMGA16Point1Degrees();
Date mga16Biur = czc.getTimeOffset(czc.getAlos16Point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 5);
System.out.println(&quot;Erev Pesach Zmanim for &quot; + locationName);
System.out.println(&quot;Sof Zman Achilas Chametz GRA: &quot; + graAchilas);
System.out.println(&quot;Sof Zman Biur Chametz GRA: : &quot; + graBiur);
System.out.println(&quot;Sof Zman Achilas Chametz MGA 72 Minutes: &quot; + mga72Achilas);
System.out.println(&quot;Sof Zman Biur Chametz MGA 72 Minutes: &quot; + mga72Biur);
System.out.println(&quot;Sof Zman Achilas Chametz MGA 16.1 Deg: &quot; + mga16Achilas);
System.out.println(&quot;Sof Zman Biur Chametz MGA 16.1 Deg: &quot; + mga16Biur);
</pre>

this would output

<pre class="brush: plain; title: ; notranslate">
C:\path\to\code&gt;javac ErevPesachZmanim.java

C:\path\to\code&gt;java ErevPesachZmanim

Erev Pesach Zmanim for Lakewood, NJ
Sof Zman Achilas Chametz GRA: Mon Apr 18 10:42:42 EDT 2011
Sof Zman Biur Chametz GRA: : Mon Apr 18 11:49:39 EDT 2011
Sof Zman Achilas Chametz MGA 72 Minutes: Mon Apr 18 10:18:42 EDT 2011
Sof Zman Biur Chametz MGA 72 Minutes: Mon Apr 18 11:37:39 EDT 2011
Sof Zman Achilas Chametz MGA 16.1 Deg: Mon Apr 18 10:13:56 EDT 2011
Sof Zman Biur Chametz MGA 16.1 Deg: Mon Apr 18 11:35:18 EDT 2011
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.kosherjava.com/2011/04/14/calculating-erev-pesach-zmanim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zmanim API Now in a Public SVN Server</title>
		<link>http://www.kosherjava.com/2011/03/23/zmanim-api-in-svn/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=zmanim-api-in-svn</link>
		<comments>http://www.kosherjava.com/2011/03/23/zmanim-api-in-svn/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 03:19:52 +0000</pubDate>
		<dc:creator>KosherJava</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[Zmanim]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Zmanim API Release]]></category>

		<guid isPermaLink="false">http://www.kosherjava.com/?p=834</guid>
		<description><![CDATA[Thanks to Jay Gindin, the Zmanim API source code is now in a publicly available SVN server. The Google Code project can be found at code.google.com/p/kosherjava. This will have a number of benefits to the project. It will more easily allow users to find the code, ensure that they have the latest code, track changes, [...]]]></description>
			<content:encoded><![CDATA[<img class="alignleft" src="/images/vault.jpg" alt="Java Vault"/>Thanks to <a href="http://code.google.com/p/android-zmanim/">Jay Gindin</a>, the <a href="http://www.kosherjava.com/zmanim-project/">Zmanim API</a> source code is now in a publicly available <a href="http://en.wikipedia.org/wiki/Apache_Subversion">SVN</a> server. The <a href="http://code.google.com/hosting/">Google Code project</a> can be found at <a href="https://code.google.com/p/kosherjava/">code.google.com/p/kosherjava</a>. This will have a number of benefits to the project. It will more easily allow users to find the code, ensure that they have the latest code, track changes, and allow reverting to prior versions in case an issue arises with newly checked in code. It will also allow me to stop the manual backups (part of the projects <a href="http://en.wikipedia.org/wiki/Apache_Ant">Ant</a> <a href="http://code.google.com/p/kosherjava/source/browse/trunk/build/build.xml">build script</a>) done as part of every development build. The repository has the new <a href="http://www.kosherjava.com/zmanim/docs/api/net/sourceforge/zmanim/hebrewcalendar/package-summary.html">hebrewcalendar</a> package mentioned in the recently posted <a href="http://www.kosherjava.com/2011/02/23/faq-how-do-i-calculate-the-jewish-hebrew-date-for/">FAQ: How do I Calculate the Jewish/Hebrew Date for …?</a>. This new code is under heavy revision, and there will be changes that will likely break code using the current alpha version. The pace of changes to the interface will likely remain stable once the first beta version is released (probably after Pesach). The next step will be to touch base with various people who have copies of the API in their own SVN to either update or link to this official project SVN server.]]></content:encoded>
			<wfw:commentRss>http://www.kosherjava.com/2011/03/23/zmanim-api-in-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FAQ: How do I Calculate the Jewish/Hebrew Date for &#8230;?</title>
		<link>http://www.kosherjava.com/2011/02/23/faq-how-do-i-calculate-the-jewish-hebrew-date-for/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=faq-how-do-i-calculate-the-jewish-hebrew-date-for</link>
		<comments>http://www.kosherjava.com/2011/02/23/faq-how-do-i-calculate-the-jewish-hebrew-date-for/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 05:14:16 +0000</pubDate>
		<dc:creator>KosherJava</dc:creator>
				<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[Zmanim]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[Hebrew Date]]></category>
		<category><![CDATA[Jewish Calendar]]></category>
		<category><![CDATA[Jewish date]]></category>
		<category><![CDATA[Zmanim Accuracy]]></category>

		<guid isPermaLink="false">http://www.kosherjava.com/?p=266</guid>
		<description><![CDATA[Question:How do I get the Jewish Date for &#8230; using the Zmanim API? Answer:The current version of the Zanim API does not support Jewish calendrical calculations. Zmanim are almost exclusively based on the solar calendar, so for example, the sunrise on February 8th this year in Montreal (or any other date and location), will be [...]]]></description>
			<content:encoded><![CDATA[<img class="alignleft" src="/images/calendarJava.png" alt="Java Calendar"/><h2>Question:</h2>How do I get the Jewish Date for &#8230; using the <a href="http://www.kosherjava.com/zmanim-project/">Zmanim API</a>?
<h2>Answer:</h2>The <a href="http://www.kosherjava.com/zmanim-project/downloads/">current version</a> of the Zanim API does not support <a href="http://en.wikipedia.org/wiki/Hebrew_calendar">Jewish calendrical</a> calculations. Zmanim are almost exclusively based on the <a href="http://en.wikipedia.org/wiki/Solar_calendar">solar calendar</a>, so for example, the sunrise on February 8th this year in <a href="http://en.wikipedia.org/wiki/Montreal">Montreal</a> (or any other date and location), will be almost the same every year. for this reason there was little point (as far as zmanim) to support Jewish date calculations in the API.  One of the only zmanim to rely on a Jewish date is the sof zman <a href="http://en.wikipedia.org/wiki/Kiddush_Levana">kidush levanah</a> calculation, though there are some opinions that it is purely <a href="http://en.wikipedia.org/wiki/Molad">molad</a> based, and this can be calculated without a Jewish calendar component to the API. This zman is obviously not currently implemented in the Zmanim API. I am currently working on adding Jewish date support to the API. The code is based off <a href="http://www.facebook.com/avromf">Avrom Finkelstein</a>&#8216;s no longer active <a href="http://web.archive.org/web/20061207174551/http://www.bayt.org/calendar/hebdate.html">HebrewDate project</a>. I refactored a lot of the code and fixed a number of bugs. Anyone interested in alpha testing this code can download the <a href="https://code.google.com/p/kosherjava/">latest Zmanim SVN code</a> (or download the <a href="http://kosherjava.googlecode.com/files/zmanim-1.3.0alpha3.zip">Zmanim API 1.3.0 alpha </a> release).
I mentioned that it &#8220;will be almost the same every year&#8221; and this is due the the approximate 1/4 day drift between the 356 day calendar year and the approximately 365.25 days actually present in the <a href="http://en.wikipedia.org/wiki/Astronomical_year">astronomical year</a>, a discrepancy corrected every <a href="http://en.wikipedia.org/wiki/Leap_year">leap year</a>. A future FAQ (probably a few of them) may delve specifically into this drift as well as general zmanim accuracy issues in detail. 
If you are simply looking to convert a Hebrew date to Gregorian or Gregorian to Hebrew online without the API, try the <a href="http://www.jewishgen.org">JewishGen</a> <a href="http://www.jewishgen.org/JOS/josdates.htm">calendar conversion tools</a>.]]></content:encoded>
			<wfw:commentRss>http://www.kosherjava.com/2011/02/23/faq-how-do-i-calculate-the-jewish-hebrew-date-for/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

