Package-level declarations

Types

Link copied to clipboard
open class AstronomicalCalendar(var geoLocation: GeoLocation)

A Java calendar that calculates astronomical times such as sunrise, sunset and twilight times. This class contains a calendar and can therefore use the standard Calendar functionality to change dates etc. The calculation engine used to calculate the astronomical times can be changed to a different implementation by implementing the abstract AstronomicalCalculator and setting it with the astronomicalCalculator. A number of different calculation engine implementations are included in the util package. Note: There are times when the algorithms can't calculate proper values for sunrise, sunset and twilight. This is usually caused by trying to calculate times for areas either very far North or South, where sunrise / sunset never happen on that date. This is common when calculating twilight with a deep dip below the horizon for locations as far south of the North Pole as London, in the northern hemisphere. The sun never reaches this dip at certain times of the year. When the calculations encounter this condition a null will be returned when a [Date] is expected and Long.MIN_VALUE when a long is expected. The reason that Exceptions are not thrown in these cases is because the lack of a rise/set or twilight is not an exception, but an expected condition in many parts of the world.

Link copied to clipboard

This class extends ZmanimCalendar and provides many more zmanim than available in the ZmanimCalendar. The basis for most zmanim in this class are from the sefer **[Yisroel

Link copied to clipboard
sealed class Zman<T> : Comparable<Zman<T>>

This class represents a halachic moment in time or duration of time. Some zmanim, like ZmanType.SHAA_ZMANIS, don't have a moment when they occur. Rather, they carry a value. Others, like ZmanType.SHKIAH happen at a specific moment in time.

Link copied to clipboard
Link copied to clipboard
open class ZmanimCalendar(var geoLocation: GeoLocation = GeoLocation(), var isUseElevation: Boolean = false, var candleLightingOffset: Double = 18.0) : AstronomicalCalendar

The ZmanimCalendar is a specialized calendar that can calculate sunrise, sunset and Jewish zmanim (religious times) for prayers and other Jewish religious duties. This class contains the main functionality of the Zmanim library. For a much more extensive list of zmanim, use the ComplexZmanimCalendar that extends this class. See documentation for the ComplexZmanimCalendar and AstronomicalCalendar for simple examples on using the API. Elevation based zmanim (even sunrise and sunset) should not be used lekula without the guidance of a posek. According to Rabbi Dovid Yehudah Bursztyn in his Zmanim Kehilchasam, 7th edition chapter 2, section 7 (pages 181-182) and section 9 (pages 186-187), no zmanim besides sunrise and sunset should use elevation. However, Rabbi Yechiel Avrahom Zilber in the Birur Halacha Vol. 6 Ch. 58 Pages &34 and &42 is of the opinion that elevation should be accounted for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should be factored into zmanim calculations. The setting defaults to false (elevation will not be used for zmanim calculations besides sunrise and sunset), unless the setting is changed to true in isUseElevation. This will impact sunrise and sunset-based zmanim such as sunrise, sunset, sofZmanShmaGRA, alos-based zmanim such as sofZmanShmaMGA that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as ComplexZmanimCalendar.sofZmanShmaMGA90MinutesZmanis that are based on sunrise and sunset. Even when set to true it will not impact zmanim that are a degree-based offset of sunrise and sunset, such as or ComplexZmanimCalendar.getSofZmanShmaBaalHatanya since these zmanim are not linked to sunrise or sunset times (the calculations are based on the astronomical definition of sunrise and sunset calculated in a vacuum with the solar radius above the horizon), and are therefore not impacted by the use of elevation. For additional information on the halachic impact of elevation on zmanim see:

Functions

Link copied to clipboard
fun main(args: Array<String>)