import { DateTime } from 'luxon';
import { ValueOf } from './polyfills/Utils';
import { GeoLocation } from './util/GeoLocation';
import { AstronomicalCalculator } from './util/AstronomicalCalculator';
/**
* A Java calendar that calculates astronomical times such as {@link #getSunrise() sunrise} and {@link #getSunset()
* sunset} times. This class contains a {@link #getCalendar() 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 {@link AstronomicalCalculator} and setting it with the
* {@link #setAstronomicalCalculator(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
* {@link java.util.Date} is expected and {@link 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.
*
* Here is a simple example of how to use the API to calculate sunrise. * First create the Calendar for the location you would like to calculate sunrise or sunset times for: * *
* String locationName = "Lakewood, NJ";
* double latitude = 40.0828; // Lakewood, NJ
* double longitude = -74.2094; // Lakewood, NJ
* double elevation = 20; // optional elevation correction in Meters
* // the String parameter in getTimeZone() has to be a valid timezone listed in
* // {@link java.util.TimeZone#getAvailableIDs()}
* TimeZone timeZone = TimeZone.getTimeZone("America/New_York");
* GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);
* AstronomicalCalendar ac = new AstronomicalCalendar(location);
*
*
* To get the time of sunrise, first set the date you want (if not set, the date will default to today):
*
* * ac.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY); * ac.getCalendar().set(Calendar.DAY_OF_MONTH, 8); * Date sunrise = ac.getSunrise(); ** * * @author © Eliyahu Hershfeld 2004 - 2016 */ export declare class AstronomicalCalendar { /** * 90° below the vertical. Used as a basis for most calculations since the location of the sun is 90° below * the horizon at sunrise and sunset. * Note : it is important to note that for sunrise and sunset the {@link AstronomicalCalculator#adjustZenith * adjusted zenith} is required to account for the radius of the sun and refraction. The adjusted zenith should not * be used for calculations above or below 90° since they are usually calculated as an offset to 90°. */ static readonly GEOMETRIC_ZENITH: number; /** Sun's zenith at civil twilight (96°). */ static readonly CIVIL_ZENITH: number; /** Sun's zenith at nautical twilight (102°). */ static readonly NAUTICAL_ZENITH: number; /** Sun's zenith at astronomical twilight (108°). */ static readonly ASTRONOMICAL_ZENITH: number; /** constant for milliseconds in a minute (60,000) */ static readonly MINUTE_MILLIS: number; /** constant for milliseconds in an hour (3,600,000) */ static readonly HOUR_MILLIS: number; /** * The Java Calendar encapsulated by this class to track the current date used by the class */ private date; /** * the {@link GeoLocation} used for calculations. */ private geoLocation; /** * the internal {@link AstronomicalCalculator} used for calculating solar based times. */ private astronomicalCalculator; /** * The getSunrise method returns a
Date representing the
* {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunrise time. The zenith used
* for the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus
* {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the
* {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction
* and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}.
* See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using.
*
* @return the Date representing the exact sunrise time. If the calculation can't be computed such as
* in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
* does not set, a null will be returned. See detailed explanation on top of the page.
* @see AstronomicalCalculator#adjustZenith
* @see #getSeaLevelSunrise()
* @see AstronomicalCalendar#getUTCSunrise
*/
getSunrise(): DateTime | null;
/**
* A method that returns the sunrise without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation
* adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,
* something that is not affected by elevation. This method returns sunrise calculated at sea level. This forms the
* base for dawn calculations that are calculated as a dip below the horizon before sunrise.
*
* @return the Date representing the exact sea-level sunrise time. If the calculation can't be computed
* such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
* where it does not set, a null will be returned. See detailed explanation on top of the page.
* @see AstronomicalCalendar#getSunrise
* @see AstronomicalCalendar#getUTCSeaLevelSunrise
* @see #getSeaLevelSunset()
*/
getSeaLevelSunrise(): DateTime | null;
/**
* A method that returns the beginning of civil twilight
* (dawn) using a zenith of {@link #CIVIL_ZENITH 96°}.
*
* @return The Date of the beginning of civil twilight using a zenith of 96°. If the calculation
* can't be computed, null will be returned. See detailed explanation on top of the page.
* @see #CIVIL_ZENITH
*/
getBeginCivilTwilight(): DateTime | null;
/**
* A method that returns the beginning of nautical twilight using a zenith of {@link
* #NAUTICAL_ZENITH 102°}.
*
* @return The Date of the beginning of nautical twilight using a zenith of 102°. If the
* calculation can't be computed null will be returned. See detailed explanation on top of the page.
* @see #NAUTICAL_ZENITH
*/
getBeginNauticalTwilight(): DateTime | null;
/**
* A method that returns the beginning of astronomical twilight using a zenith of
* {@link #ASTRONOMICAL_ZENITH 108°}.
*
* @return The Date of the beginning of astronomical twilight using a zenith of 108°. If the
* calculation can't be computed, null will be returned. See detailed explanation on top of the page.
* @see #ASTRONOMICAL_ZENITH
*/
getBeginAstronomicalTwilight(): DateTime | null;
/**
* The getSunset method returns a Date representing the
* {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunset time. The zenith used for
* the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus
* {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the
* {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction
* and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}.
* See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. Note:
* In certain cases the calculates sunset will occur before sunrise. This will typically happen when a timezone
* other than the local timezone is used (calculating Los Angeles sunset using a GMT timezone for example). In this
* case the sunset date will be incremented to the following date.
*
* @return the Date representing the exact sunset time. If the calculation can't be computed such as in
* the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
* does not set, a null will be returned. See detailed explanation on top of the page.
* @see AstronomicalCalculator#adjustZenith
* @see #getSeaLevelSunset()
* @see AstronomicalCalendar#getUTCSunset
*/
getSunset(): DateTime | null;
/**
* A method that returns the sunset without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation
* adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,
* something that is not affected by elevation. This method returns sunset calculated at sea level. This forms the
* base for dusk calculations that are calculated as a dip below the horizon after sunset.
*
* @return the Date representing the exact sea-level sunset time. If the calculation can't be computed
* such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
* where it does not set, a null will be returned. See detailed explanation on top of the page.
* @see AstronomicalCalendar#getSunset
* @see AstronomicalCalendar#getUTCSeaLevelSunset
* @see #getSunset()
*/
getSeaLevelSunset(): DateTime | null;
/**
* A method that returns the end of civil twilight
* using a zenith of {@link #CIVIL_ZENITH 96°}.
*
* @return The Date of the end of civil twilight using a zenith of {@link #CIVIL_ZENITH 96°}. If
* the calculation can't be computed, null will be returned. See detailed explanation on top of the page.
* @see #CIVIL_ZENITH
*/
getEndCivilTwilight(): DateTime | null;
/**
* A method that returns the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}.
*
* @return The Date of the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}
* . If the calculation can't be computed, null will be returned. See detailed explanation on top of the
* page.
* @see #NAUTICAL_ZENITH
*/
getEndNauticalTwilight(): DateTime | null;
/**
* A method that returns the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH 108°}.
*
* @return the Date of the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH
* 108°}. If the calculation can't be computed, null will be returned. See detailed explanation on top
* of the page.
* @see #ASTRONOMICAL_ZENITH
*/
getEndAstronomicalTwilight(): DateTime | null;
/**
* A utility method that returns a date offset by the offset time passed in. Please note that the level of light
* during twilight is not affected by elevation, so if this is being used to calculate an offset before sunrise or
* after sunset with the intent of getting a rough "level of light" calculation, the sunrise or sunset time passed
* to this method should be sea level sunrise and sunset.
*
* @param time
* the start time
* @param offset
* the offset in milliseconds to add to the time.
* @return the {@link java.util.Date} with the offset in milliseconds added to it
*/
static getTimeOffset(time: DateTime | null, offset: number): DateTime | null;
/**
* A utility method that returns the time of an offset by degrees below or above the horizon of
* {@link #getSunrise() sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14°
* before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.
*
* @param offsetZenith
* the degrees before {@link #getSunrise()} to use in the calculation. For time after sunrise use
* negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14°
* before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a
* parameter.
* @return The {@link java.util.Date} of the offset after (or before) {@link #getSunrise()}. If the calculation
* can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does
* not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
* page.
*/
getSunriseOffsetByDegrees(offsetZenith: number): DateTime | null;
/**
* A utility method that returns the time of an offset by degrees below or above the horizon of {@link #getSunset()
* sunset}. Note that the degree offset is from the vertical, so for a calculation of 14° after sunset, an
* offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.
*
* @param offsetZenith
* the degrees after {@link #getSunset()} to use in the calculation. For time before sunset use negative
* numbers. Note that the degree offset is from the vertical, so for a calculation of 14° after
* sunset, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.
* @return The {@link java.util.Date}of the offset after (or before) {@link #getSunset()}. If the calculation can't
* be computed such as in the Arctic Circle where there is at least one day a year where the sun does not
* rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
* page.
*/
getSunsetOffsetByDegrees(offsetZenith: number): DateTime | null;
/**
* Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default
* {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.
*/
/**
* A constructor that takes in geolocation information as a
* parameter. The default {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} used for solar
* calculations is the more accurate {@link NOAACalculator}.
*
* @param geoLocation
* The location information used for calculating astronomical sun times.
*
* @see #setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class.
* @see #ComplexZmanimCalendar(GeoLocation)
*/
constructor(geoLocation?: GeoLocation);
/**
* A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using
* daylight savings time.
*
* @param zenith
* the degrees below the horizon. For time after sunrise use negative numbers.
* @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
* Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
* not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.
*/
getUTCSunrise(zenith: number): number;
/**
* A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using
* daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible
* light, something that is not affected by elevation. This method returns UTC sunrise calculated at sea level. This
* forms the base for dawn calculations that are calculated as a dip below the horizon before sunrise.
*
* @param zenith
* the degrees below the horizon. For time after sunrise use negative numbers.
* @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
* Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
* not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.
* @see AstronomicalCalendar#getUTCSunrise
* @see AstronomicalCalendar#getUTCSeaLevelSunset
*/
getUTCSeaLevelSunrise(zenith: number): number;
/**
* A method that returns the sunset in UTC time without correction for time zone offset from GMT and without using
* daylight savings time.
*
* @param zenith
* the degrees below the horizon. For time after sunset use negative numbers.
* @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
* Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
* not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.
* @see AstronomicalCalendar#getUTCSeaLevelSunset
*/
getUTCSunset(zenith: number): number;
/**
* A method that returns the sunset in UTC time without correction for elevation, time zone offset from GMT and
* without using daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the
* amount of visible light, something that is not affected by elevation. This method returns UTC sunset calculated
* at sea level. This forms the base for dusk calculations that are calculated as a dip below the horizon after
* sunset.
*
* @param zenith
* the degrees below the horizon. For time before sunset use negative numbers.
* @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
* Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
* not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.
* @see AstronomicalCalendar#getUTCSunset
* @see AstronomicalCalendar#getUTCSeaLevelSunrise
*/
getUTCSeaLevelSunset(zenith: number): number;
/**
* A method that returns a sea-level based temporal (solar) hour. The day from {@link #getSeaLevelSunrise()
* sea-level sunrise} to {@link #getSeaLevelSunset() sea-level sunset} is split into 12 equal parts with each
* one being a temporal hour.
*
* @see #getSeaLevelSunrise()
* @see #getSeaLevelSunset()
* @see #getTemporalHour(Date, Date)
*
* @return the long millisecond length of a temporal hour. If the calculation can't be computed,
* {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page.
*
* @see #getTemporalHour(Date, Date)
*/
/**
* A utility method that will allow the calculation of a temporal (solar) hour based on the sunrise and sunset
* passed as parameters to this method. An example of the use of this method would be the calculation of a
* non-elevation adjusted temporal hour by passing in {@link #getSunrise() sea level sunrise} and
* {@link #getSunset() sea level sunset} as parameters.
*
* @param startOfDay
* The start of the day.
* @param endOfDay
* The end of the day.
*
* @return the long millisecond length of the temporal hour. If the calculation can't be computed a
* {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page.
*
* @see #getTemporalHour()
*/
getTemporalHour(startOfDay?: DateTime | null, endOfDay?: DateTime | null): number;
/**
* A method that returns sundial or solar noon. It occurs when the Sun is transiting the celestial meridian. In this class it is
* calculated as halfway between sea level sunrise and sea level sunset, which can be slightly off the real transit
* time due to changes in declination (the lengthening or shortening day).
*
* @return the Date representing Sun's transit. If the calculation can't be computed such as in the
* Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
* not set, null will be returned. See detailed explanation on top of the page.
* @see #getSunTransit(Date, Date)
* @see #getTemporalHour()
*/
/**
* A method that returns sundial or solar noon. It occurs when the Sun is transiting the celestial meridian. The calculations used by
* this class depend on the {@link AstronomicalCalculator} used. If this calendar instance is {@link
* #setAstronomicalCalculator(AstronomicalCalculator) set} to use the {@link com.kosherjava.zmanim.util.NOAACalculator}
* (the default) it will calculate astronomical noon. If the calendar instance is to use the
* {@link com.kosherjava.zmanim.util.SunTimesCalculator}, that does not have code to calculate astronomical noon, the
* sun transit is calculated as halfway between sea level sunrise and sea level sunset, which can be slightly off the
* real transit time due to changes in declination (the lengthening or shortening day). See The Definition of Chatzos for details on the proper
* definition of solar noon / midday.
*
* @return the Date representing Sun's transit. If the calculation can't be computed such as when using
* the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO calculator} that does not support getting solar
* noon for the Arctic Circle (where there is at least one day a year where the sun does not rise, and one where
* it does not set), a null will be returned. See detailed explanation on top of the page.
* @see #getSunTransit(Date, Date)
* @see #getTemporalHour()
* @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(Calendar, GeoLocation)
* @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation)
*/
getSunTransit(): DateTime | null;
getSunTransit(startOfDay: DateTime | null, endOfDay: DateTime | null): DateTime | null;
/**
* A method that returns solar midnight. It occurs when the Sun is transiting the lower celestial meridian, or when the sun is at it's
* nadir. The calculations used by this class depend on the {@link
* AstronomicalCalculator} used. If this calendar instance is {@link #setAstronomicalCalculator(AstronomicalCalculator)
* set} to use the {@link com.kosherjava.zmanim.util.NOAACalculator} (the default) it will calculate astronomical
* midnight. If the calendar instance is to use the {@link com.kosherjava.zmanim.util.SunTimesCalculator}, that does not
* have code to calculate astronomical noon, midnight is calculated as halfway between sea level sunrise and sea level
* sunset on the other side of the world (180° away), which can be slightly off the real transit time due to changes
* in declination (the lengthening or shortening day). See The Definition of Chatzos for details on the proper
* definition of solar noon / midday.
*
* @deprecated This method was replaced by {@link #getSolarMidnight()} and will be removed in v3.0.
*
* @return the Date representing Sun's lower transit at the end of the current day. If the calculation can't
* be computed such as when using the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO calculator} that
* does not support getting solar noon or midnight for the Arctic Circle (where there is at least one day a year
* where the sun does not rise, and one where it does not set), a null will be returned. This is not
* relevant when using the {@link com.kosherjava.zmanim.util.NOAACalculator NOAA Calculator} that is never expected
* to return null. See the detailed explanation on top of the page.
*
* @see #getSunTransit()
* @see #getSolarMidnight()
* @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(Calendar, GeoLocation)
* @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation)
*/
getSunLowerTransit(): DateTime | null;
/**
* A method that returns solar midnight at the end of the current day (that may actually be after midnight of the day it
* is being calculated for). It occurs when the Sun is transiting the lower celestial meridian, or
* when the sun is at it's nadir. The calculations used by this class
* depend on the {@link AstronomicalCalculator} used. If this calendar instance is {@link
* #setAstronomicalCalculator(AstronomicalCalculator) set} to use the {@link com.kosherjava.zmanim.util.NOAACalculator}
* (the default) it will calculate astronomical midnight. If the calendar instance is to use the {@link
* com.kosherjava.zmanim.util.SunTimesCalculator USNO Calculator}, that does not have code to calculate astronomical noon,
* midnight is calculated as 12 hours after halfway between sea level sunrise and sea level sunset of that day. This can
* be slightly off the real transit time due to changes in declination (the lengthening or shortening day). See The Definition of Chatzos for details on the proper
* definition of solar noon / midday.
*
* @return the Date representing Sun's lower transit at the end of the current day. If the calculation can't
* be computed such as when using the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO calculator} that
* does not support getting solar noon or midnight for the Arctic Circle (where there is at least one day a year
* where the sun does not rise, and one where it does not set), a null will be returned. This is not
* relevant when using the {@link com.kosherjava.zmanim.util.NOAACalculator NOAA Calculator} that is never expected
* to return null. See the detailed explanation on top of the page.
*
* @see #getSunTransit()
* @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(Calendar, GeoLocation)
* @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation)
*/
getSolarMidnight(): DateTime | null;
/**
* An enum to indicate what type of solar event is being calculated.
*/
protected static readonly SolarEvent: {
/** SUNRISE A solar event related to sunrise */
readonly SUNRISE: 0;
/** SUNSET A solar event related to sunset */
readonly SUNSET: 1;
/** NOON A solar event related to noon */
readonly NOON: 2;
/** MIDNIGHT A solar event related to midnight */
readonly MIDNIGHT: 3;
};
/**
* A method that returns a Date from the time passed in as a parameter.
*
* @param time
* The time to be set as the time for the Date. The time expected is in the format: 18.75
* for 6:45:00 PM.
* @param solarEvent - the type of {@link SolarEvent}
* @return The Date - object representation of the time double
*/
protected getDateFromTime(time: number, solarEvent: ValueOfCalendar to deal with edge cases where the location crosses the antimeridian.
*
* @see GeoLocation#getAntimeridianAdjustment()
* @return the adjusted Calendar
*/
private getAdjustedDate;
/**
* Returns an XML formatted representation of the class using the default output of the
* {@link com.kosherjava.zmanim.util.ZmanimFormatter#toXML(AstronomicalCalendar) toXML} method.
* @see ZmanimFormatter#toXML(AstronomicalCalendar)
* @see java.lang.Object#toString()
* @deprecated (This depends on a circular dependency).
*/
toString(): void;
/**
* Returns a JSON formatted representation of the class using the default output of the
* {@link com.kosherjava.zmanim.util.ZmanimFormatter#toJSON(AstronomicalCalendar) toJSON} method.
* @see ZmanimFormatter#toJSON(AstronomicalCalendar)
* @see java.lang.Object#toString()
* @deprecated This depends on a circular dependency. Use ZmanimFormatter.toJSON(astronomicalCalendar)instead. */ toJSON(): void; /** * @see java.lang.Object#equals(Object) */ equals(object: object): boolean; /** * A method that returns the currently set {@link GeoLocation} which contains location information used for the * astronomical calculations. * * @return Returns the geoLocation. */ getGeoLocation(): GeoLocation; /** * Sets the {@link GeoLocation}
Object to be used for astronomical calculations.
*
* @param geoLocation
* The geoLocation to set.
* @todo Possibly adjust for horizon elevation. It may be smart to just have the calculator check the GeoLocation
* though it doesn't really belong there.
*/
setGeoLocation(geoLocation: GeoLocation): void;
/**
* A method that returns the currently set AstronomicalCalculator.
*
* @return Returns the astronomicalCalculator.
* @see #setAstronomicalCalculator(AstronomicalCalculator)
*/
getAstronomicalCalculator(): AstronomicalCalculator;
/**
* A method to set the {@link AstronomicalCalculator} used for astronomical calculations. The Zmanim package ships
* with a number of different implementations of the abstract {@link AstronomicalCalculator} based on
* different algorithms, including the default {@link com.kosherjava.zmanim.util.NOAACalculator} based on NOAA's implementation of Jean Meeus's algorithms as well as {@link
* com.kosherjava.zmanim.util.SunTimesCalculator} based on the US
* Naval Observatory's algorithm. This allows easy runtime switching and comparison of different algorithms.
*
* @param astronomicalCalculator
* The astronomicalCalculator to set.
*/
setAstronomicalCalculator(astronomicalCalculator: AstronomicalCalculator): void;
/**
* returns the Calendar object encapsulated in this class.
*
* @return Returns the calendar.
*/
getDate(): DateTime;
/**
* Sets the date object for use in this class.
* @param date
* The calendar to set.
*/
setDate(date: DateTime | Date | string | number): void;
/**
* A method that creates a deep copy of the object.
* Note: If the {@link java.util.TimeZone} in the cloned {@link GeoLocation} will
* be changed from the original, it is critical that
* {@link AstronomicalCalendar#getCalendar()}.
* {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the
* AstronomicalCalendar to output times in the expected offset after being cloned.
*
* @see java.lang.Object#clone()
*/
clone(): AstronomicalCalendar;
getClassName(): string;
}