Converting between different calendars.
April 13, 2005 1:26 AM   Subscribe

Are there any algorithms available for converting between Gregorian and Jewish, Islamic, Chinese calendars?

Maybe my google-fu is getting rusty, but I can't seem to find any on the web. I'm looking for actual algorithms rather than tables.
posted by plep to Science & Nature (5 answers total)
 
This site has links to the book Calendrical Calculations, which is a compendium of source code for various calendar conversion algorithms, which you might find at a local library. An applet is available to demonstrate the conversion results.
posted by AlexReynolds at 1:37 AM on April 13, 2005


Here is some FORTRAN90 code(!). This astronomy site has C source code for basic conversion algorithms.
posted by AlexReynolds at 1:54 AM on April 13, 2005


There are formulas for converting from Gregorian to Islamic, but they're not pretty. Since the Islamic calendar is based on the the lunar month, and more than that, on the first sighting of the crescent moon as the start of each month, it is very difficult to convert dates. There are some formulas for when the lunar crescent is likely to be visible, but they still depend on things like the latitude, time of sunrise/set, and probably some stuff I'm forgetting. When you consider that clouds can interfere with the sighting, it gets more complicated.

David A. King has written several papers/books on the general subject of Islamic astronomy, and the website www.hilal-sighting.com also has information on the topic. There are probably also webapps, but if you want a very specific date, you will probably need to search for more detail.
posted by lorimt at 1:54 AM on April 13, 2005


Well, if you don't mind reading elisp, you can download Emacs and look at the code implementing its calendar, which supports ISO, Julian, Hebrew, Islamic, French Revolutionary, Mayan, Coptic, Persian, and Chinese calendar systems.
posted by letourneau at 4:12 AM on April 13, 2005


Thanks for the pointers, all.

I think I'm going to buy the book! :)
posted by plep at 7:29 AM on April 13, 2005


« Older Robotic Pharmacy   |   Are you getting a lot of stock-related spam on... Newer »
This thread is closed to new comments.