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 duties.
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.
To add KosherJava as a dependency to your project, add the following dependency:
Add the following to your pom.xml
file:
<dependency>
<groupId>com.kosherjava</groupId>
<artifactId>zmanim</artifactId>
<version>2.5.0</version>
</dependency>
Add the following to your build.gradle
file:
implementation group: 'com.kosherjava', name: 'zmanim', version: '2.5.0'
Or if you have build.gradle.kts
file:
implementation("com.kosherjava:zmanim:2.5.0")
The library is released under the LGPL 2.1 license.
The KosherJava Zmanim API has been ported to:
- Swift - https://github.com/Elyahu41/KosherSwift & https://github.com/DanielSmith1239/KosherSwift
- Objective-C - https://github.com/MosheBerman/KosherCocoa
- .NET - https://github.com/Yitzchok/Zmanim
- TypeScript - https://github.com/BehindTheMath/KosherZmanim
- JavaScript - https://github.com/yparitcher/zmanJS
- Kotlin - https://github.com/Sternbach-Software/KosherKotlin
- 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/
- Dart / Flutter - https://github.com/yakir8/kosher_dart
- Go - https://github.com/vlipovetskii/go-zmanim
- SQL - https://github.com/BehindTheMath/zmanim-sql (alpha quality).
- VB6/VBA (Visual Basic) - https://github.com/diaphone1/vbzmanim
The .NET port was used to create a desktop app that is available at https://github.com/NykUser/MyZman.
While I did my best to get accurate results, please double check before relying on these zmanim for halacha lemaaseh.