The Zmanim library is an API for a specialized calendar that can calculate different astronomical times including sunrise and sunset and Jewish zmanim or religious times for prayers and other Jewish religious dutuies.
These classes extend GregorianCalendar and can therefore use the standard Calendar functionality to change dates etc. For non religious astronomical / solar calculations use the AstronomicalCalendar.
The ZmanimCalendar contains the most common zmanim or religious time calculations. For a much more extensive list of zmanim use the ComplexZmanimCalendar. This class contains the main functionality of the Zmanim library.
For a basic set of instructions on the use of the API, see How to Use the Zmanim API, zmanim code samples and the KosherJava FAQ. See the KosherJava Zmanim site for additional information.
The library is released under the LGPL 2.1 license.
The KosherJava Zmanim API has been ported to:
- Objective-C / Swift - https://github.com/MosheBerman/KosherCocoa
- .NET - https://github.com/Yitzchok/Zmanim
- JavaScript / TypeScript - https://github.com/BehindTheMath/KosherZmanim and https://github.com/yparitcher/zmanJS
- Ruby - https://github.com/pinnymz/ruby-zmanim
- Scala - https://github.com/nafg/jewish-date
- C - https://github.com/yparitcher/libzmanim
- Python - https://github.com/pinnymz/python-zmanim & https://pypi.org/project/zmanim/
- PHP - https://github.com/zachweix/PhpZmanim/
There is a web api that returns json or xml and is based on the .NET port. It is available at https://wyrezmanim.herokuapp.com
Source code for the web api if you would like to self host is at https://github.com/greatjack1/dotnetcoreZmanim
While I did my best to get accurate results, please double check before relying on these zmanim for halacha lemaaseh.