@ddnn55/daylight
v2.0.1
Published
<a name="module_daylight"></a>
Readme
daylight
Predict the time of sunrise and sunset. Adapted from https://en.wikipedia.org/wiki/Sunrise_equation
daylight(date, latitude, longitude) ⇒ Object ⏏
Predict sunrise and sunset times including different types of twilight.
Kind: Exported function
Returns: Object - Object containing 8 different times:
astronomicalDawn: Astronomical dawn (sun 18° below horizon)nauticalDawn: Nautical dawn (sun 12° below horizon)civilDawn: Civil dawn (sun 6° below horizon)sunrise: Sunrise (sun 0.83° below horizon)sunset: Sunset (sun 0.83° below horizon)civilDusk: Civil dusk (sun 6° below horizon)nauticalDusk: Nautical dusk (sun 12° below horizon)astronomicalDusk: Astronomical dusk (sun 18° below horizon)
| Param | Type | Description | | --- | --- | --- | | date | Date | The date to calculate for | | latitude | Number | north/south location; -90 (south pole) to 90 (north pole) | | longitude | Number | east/west location; -180 to 180 |
