Zmanim Via Instant Messaging Bot

As hinted at in my previous post , there is a new project underway that uses the Zmanim API in a way that I had never really imagined. Using the Smack API, Michael Kopinsky created the ZmanimBot that allows getting zmanim by instant messaging the ZmanimBot, an internet bot. It currently supports the Google Talk IM system, but support for other systems might follow. Please be aware that the system is under development and is not always up. Additional information can be found on the ZmanimBot page.

Update (ג׳ אייר תשע״ג April 13, 2008): The ZmanimBot is now available via AIM

Updated Zmanim Jar Released – Please Download the Latest

In December when developing the Zmanim / Bearing to Yerushalayim map (blog post), I noticed a problem with the code used to generate zmanim. The API returns a Java Date object. Usually only the time is of interest, and the date is ignored, but in some cases (when a timezone offset is specified without using the Olson DB name (such as America/New_York) or if the GMT timezone is used for other locations, and the local standard time is calculated as an offset of GMT), the date of the sunset returned was earlier than the sunrise date. This caused zmanim such as sof zman Shema for some locations to be incorrect, since the math used was comparing sunrise to a sunset on the incorrect date, causing some very odd behavior. Updated files that correct this issue were uploaded to the site on Dec 26th. I was notified today by a developer using the jar, that not all the download links were pointing to the updated versions, and this caused issues for his program (a post about his project will be posted in the near future). All the links have now been updated. Since the old code can sometimes generate incorrect zmanim, it is highly suggested that you replace your current jar with the latest version of zmanim.jar (or zmanim.zip).

Along with the fix mentioned above, a number of other small fixes were done. These include among other minor issues, fixed, better and simplified XML output from the toString method, better error handling for expected error conditions, that had previously caused errors in the generations of zmanim for areas in the arctic circle such as Thule, Greenland. In case you are curious, someone did actually try this, and the error logs lead me to find the issue. The IP address used for the request mapped back to the Thule Air Base.

Zmanim Calendar Generator Supports 2007 DST Changes

Sunrise CalendarThe Java version on the server was just updated to JDK 5.0 Update 11 and now supports the US 2007 DST Changes mentioned in the previous post. This means that Excel zmanim calendars generated by this site will have the proper daylight savings time for zmanim.

Java Zmanim API Update

The first phase of change to allow easier porting to other languages took place with the change in the API from using inheritance of the Java Calendar classes, to one that uses composition. This will make porting it to other languages easier. Included in the update are a number of new zmanim, mostly the addition of a number of new calculations for plag hamincha that are useful when trying to avoid a tartai desasri with early erev shabbos minyanim.

Zmanim Calendar Generator Now using Google Maps

Vintage Map with CompassThe Zmanim Calendar Generator now has a simple way to look up longitude and latitude information using the Google Maps API. To use this feature, click on the Google Maps icon to display the map (location centered on Bais Medrash Gevoha in Lakewood), find the location that you want to generate zmanim for, and click that point in the map. This will update the longitude and latitude fields in the form. The Google API was pretty straight forward and simple. At the same time, I tried to integrate an elevation lookup. Google does not provide elevation information, but I attempted to look it up using a webservice. This seemingly simple task was not very straight forward. The approach was to grab the SOAP response from the REST style elevation webservice made available by Jonathan Stott. My plan was to do this all via the client sided XML parsing. The first issue encountered was browser security that does not allow cross-domain loading of XML documents (By the way this was not using XMLHttpRequest, but the same security restrictions apply). This was solved by a simple PHP page that was just a proxy for the call. That done, I managed to get it to work in IE, but it crashed the browser every second call or so. The crashing was solved by adding a small delay. I never managed to get it working in Mozilla. I later tried to use the existing Google Maps API to load it, but never got it working. I commented out all elevation code and will get to that part at some future date. I also removed the non-decimal longitude and latitude option. I hope this will be useful.