From 0dc453e50dfe05e3a155b38624e03038d7604ff3 Mon Sep 17 00:00:00 2001 From: doniseferi Date: Sun, 12 Apr 2020 16:35:34 +0100 Subject: [PATCH] Remove default exports (#17) removing default exports BREAKING CHANGE: removing default export --- README.md | 197 +++++++++++----------- src/declination/getDeclinationOfTheSun.js | 5 +- src/equationOfTime/equationOfTime.js | 5 +- src/hourAngle/getHourAngle.js | 3 +- src/hourAngle/getNoonHourAngle.js | 3 +- src/index.js | 31 +--- src/time/index.js | 109 +++++++----- suntimes.d.ts | 170 +++++++++++-------- 8 files changed, 273 insertions(+), 250 deletions(-) diff --git a/README.md b/README.md index 32594ab..1cc411f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ # [![Build Status](https://travis-ci.com/doniseferi/suntimes.svg?branch=master)](https://travis-ci.com/doniseferi/suntimes) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/27de579f6fc84188ba0aac2601ec05f0)](https://www.codacy.com/manual/doniseferi/suntimes?utm_source=github.com&utm_medium=referral&utm_content=doniseferi/suntimes&utm_campaign=Badge_Grade) ![GitHub](https://img.shields.io/github/license/doniseferi/suntimes) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/doniseferi/suntimes) ![Snyk Vulnerabilities for npm package version](https://img.shields.io/snyk/vulnerabilities/npm/suntimes) ![GitHub commit activity](https://img.shields.io/github/commit-activity/w/doniseferi/suntimes) ![GitHub last commit](https://img.shields.io/github/last-commit/doniseferi/suntimes) ![Coveralls github](https://img.shields.io/coveralls/github/doniseferi/suntimes) [![GitHub issues](https://img.shields.io/github/issues/doniseferi/suntimes)](https://github.com/doniseferi/suntimes/issues) -A tiny library to get the exact date and time in [utc](https://en.wikipedia.org/wiki/ISO_8601) for certain points of the day for any desired location and date. +A tiny library to get the exact date and time in an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format for certain points of the day for any desired location and date. + ## Install @@ -13,7 +14,7 @@ A tiny library to get the exact date and time in [utc](https://en.wikipedia.org/ ## Api Reference * * * - + ## Functions
@@ -21,7 +22,8 @@ A tiny library to get the exact date and time in [utc](https://en.wikipedia.org/

The angular distance of the sun north or south of the earth's equator.

equationOfTime(date)number
-

The correction between standard clock time and the time based on the exact position of the sun in the sky represented as decimal time in minutes.

+

The correction between standard clock time and the time based on the exact position of the sun in the sky represented as decimal +time in minutes.

getHourAngleSinceNoon(date, latitude, angle)number

Gets the hour angle difference between noon and the angle value.

@@ -53,11 +55,11 @@ A tiny library to get the exact date and time in [utc](https://en.wikipedia.org/
getNauticalDawnEndDateTimeUtc(date, latitude, longitude)string

Gets the end of nautical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value.

-
getNauticalDawnStartDateTimeUtc(date, latitude, longitude)string
-

Gets the start of nautical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value.

+
getNauticalDawnStartDateTimeUtc(date, latitude, longitude)string

Gets the start of nautical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value.

getAstronomicalDawnEndDateTimeUtc(date, latitude, longitude)string
-

Gets the end of astronomical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value.

+

Gets the end of astronomical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude +value.

getAstronomicalDawnStartDateTimeUtc(date, latitude, longitude)string

Gets the start of astronomical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value.

@@ -66,13 +68,13 @@ A tiny library to get the exact date and time in [utc](https://en.wikipedia.org/

Gets the start of astronomical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value.

getAstronomicalDuskEndDateTimeUtc(date, latitude, longitude)string
-

Gets the end of astronomical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value.

+

Gets the end of astronomical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude +value.

getNauticalDuskEndDateTimeUtc(date, latitude, longitude)string

Gets the end of nautical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value.

-
getNauticalDuskStartDateTimeUtc(date, latitude, longitude)string
-

Gets the start of nautical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value.

+
getNauticalDuskStartDateTimeUtc(date, latitude, longitude)string

Gets the start of nautical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value.

getCivilDuskEndDateTimeUtc(date, latitude, longitude)string

Gets the end of civil dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value.

@@ -91,14 +93,14 @@ The angular distance of the sun north or south of the earth's equator. **Kind**: global function **Returns**: number - The declination in degrees where north is a positive value and south is a negative value within a range of range of -23.45 and 23.45. -| Param | Type | Description | -| --- | --- | --- | -| date | Date | A date instance | +| Param | Type | Description | +| ----- | ----------------- | --------------- | +| date | Date | A date instance | -**Example** *(Example usage of getDeclinationOfTheSun.)* +**Example** *(Example usage of getDeclinationOfTheSun)* ```js // returns -23.078780854838076 -suntimes.getDeclinationOfTheSun(new Date(2019, 0, 1)); +getDeclinationOfTheSun(new Date(2019, 0, 1)); ``` * * * @@ -109,14 +111,14 @@ The correction between standard clock time and the time based on the exact posit **Kind**: global function **Returns**: number - A number whose value is the equation of time in minutes decimal time for the Date represented by date. -| Param | Type | Description | -| --- | --- | --- | -| date | Date | A date instance. | +| Param | Type | Description | +| ----- | ----------------- | ---------------- | +| date | Date | A date instance. | -**Example** *(Example usage of equationOfTime.)* +**Example** *(Example usage of equationOfTime)* ```js // returns -10.306964615344999 -suntimes.equationOfTime(new Date(2025, 0, 18)); +equationOfTime(new Date(2025, 0, 18)); ``` * * * @@ -132,16 +134,16 @@ Gets the hour angle difference between noon and the angle value. - RangeError The sun altitude never drops below the angle specified. -| Param | Type | Description | -| --- | --- | --- | -| date | Date | A date instance. | +| Param | Type | Description | +| -------- | ------------------- | ------------------------------------------- | +| date | Date | A date instance. | | latitude | number | A latitude value in the range of -90 to 90. | -| angle | number | An angle value. | +| angle | number | An angle value. | **Example** *(Example usage of getHourAngleSinceNoon)* ```js // returns 5.54554469317797 -suntimes.getHourAngleSinceNoon(new Date(2025, 0, 18), 51.477730, -12); +getHourAngleSinceNoon(new Date(2025, 0, 18), 51.477730, -12); ``` * * * @@ -152,15 +154,15 @@ Gets the noon hour angle for the date and longitude value. **Kind**: global function **Returns**: number - The noon hour angle expressed as a number between 0.00 and 23.9. -| Param | Type | Description | -| --- | --- | --- | -| date | Date | A date instance. | +| Param | Type | Description | +| --------- | ------------------- | ---------------------------------------------- | +| date | Date | A date instance. | | longitude | number | A longitude value in the range of -180 to 180. | **Example** *(Example usage of getNoonHourAngle)* ```js // returns 12.17245941025575 -suntimes.getNoonHourAngle(new Date(2025, 0, 18), -0.010150); +getNoonHourAngle(new Date(2025, 0, 18), -0.010150); ``` * * * @@ -171,15 +173,15 @@ Gets the noon date and time in UTC expressed in an ISO 8601 format for date and **Kind**: global function **Returns**: string - A string representing noon date and time in UTC, expressed in an ISO 8601 format. -| Param | Type | Description | -| --- | --- | --- | -| date | Date | A date instance. | +| Param | Type | Description | +| --------- | ------------------- | ---------------------------------------------- | +| date | Date | A date instance. | | longitude | number | A longitude value in the range of -180 to 180. | **Example** *(Example usage of getNoonDateTimeUtc)* ```js // returns "2025-01-18T12:10:20.853Z" -suntimes.getNoonDateTimeUtc(new Date(2025, 0, 18), -0.010150); +getNoonDateTimeUtc(new Date(2025, 0, 18), -0.010150); ``` * * * @@ -190,58 +192,57 @@ Gets the date and time in UTC expressed in an ISO 8601 format for an angle befor **Kind**: global function **Returns**: string - A string representing the time and date for an angle before noon in UTC, expressed in an ISO 8601 format. -| Param | Type | Description | -| --- | --- | --- | -| angle | number | An angle value. | -| date | Date | A date instance. | -| latitude | number | A latitude value in the range of -90 to 90. | +| Param | Type | Description | +| --------- | ------------------- | ---------------------------------------------- | +| angle | number | An angle value. | +| date | Date | A date instance. | +| latitude | number | A latitude value in the range of -90 to 90. | | longitude | number | A longitude value in the range of -180 to 180. | **Example** *(Example usage of getDateTimeUtcOfAngleBeforeNoon)* ```js // returns "2025-01-18T05:57:45.720Z" -suntimes.getDateTimeUtcOfAngleBeforeNoon(-18, new Date(2025, 0, 18), 51.477730, -0.010150); +getDateTimeUtcOfAngleBeforeNoon(-18, new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getDateTimeUtcOfAngleBeforeNoon)* ```js // returns "The sun's altitude does not drop to -18° on Wed Jun 18 2025 at latitude 51.47773 and longitude -0.01015" -suntimes.getDateTimeUtcOfAngleBeforeNoon(-18, new Date(2025, 5, 18), 51.477730, -0.010150); +getDateTimeUtcOfAngleBeforeNoon(-18, new Date(2025, 5, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getDateTimeUtcOfAngleBeforeNoon)* ```js // returns "The sun's altitude does not rise to 18° on Wed Jun 18 2025 at latitude -51.47773 and longitude -0.01015" -suntimes.getDateTimeUtcOfAngleBeforeNoon(18, new Date(2025, 5, 18), -51.477730, -0.010150); +getDateTimeUtcOfAngleBeforeNoon(18, new Date(2025, 5, 18), -51.477730, -0.010150); ``` * * * ## getDateTimeUtcOfAngleAfterNoon(angle, date, latitude, longitude) ⇒ string Gets the date and time in UTC expressed in an ISO 8601 format for an angle after noon for the angle, date, latitude and longitude value. - **Kind**: global function **Returns**: string - A string representing the time and date for an angle after noon in UTC, expressed in an ISO 8601 format. -| Param | Type | Description | -| --- | --- | --- | -| angle | number | An angle value. | -| date | Date | A date instance. | -| latitude | number | A latitude value in the range of -90 to 90. | +| Param | Type | Description | +| --------- | ------------------- | ---------------------------------------------- | +| angle | number | An angle value. | +| date | Date | A date instance. | +| latitude | number | A latitude value in the range of -90 to 90. | | longitude | number | A longitude value in the range of -180 to 180. | **Example** *(Example usage of getDateTimeUtcOfAngleAfterNoon)* ```js //returns "2025-06-18T14:33:42.689Z" -suntimes.getDateTimeUtcOfAngleAfterNoon(8, new Date(2025, 5, 18), -51.477730, -0.010150); +getDateTimeUtcOfAngleAfterNoon(8, new Date(2025, 5, 18), -51.477730, -0.010150); ``` **Example** *(Example usage of getDateTimeUtcOfAngleAfterNoon)* ```js // returns "The sun's altitude does not drop to -18° on Sat Jan 18 2025 at latitude -51.47773 and longitude -0.01015" -suntimes.getDateTimeUtcOfAngleAfterNoon(-18, new Date(2025, 0, 18), -51.477730, -0.010150); +getDateTimeUtcOfAngleAfterNoon(-18, new Date(2025, 0, 18), -51.477730, -0.010150); ``` **Example** *(Example usage of getDateTimeUtcOfAngleAfterNoon)* ```js // returns "The sun's altitude does not rise to 18° on Wed Jun 18 2025 at latitude -51.47773 and longitude -0.01015" -suntimes.getDateTimeUtcOfAngleAfterNoon(18, new Date(2025, 5, 18), -51.477730, -0.010150); +getDateTimeUtcOfAngleAfterNoon(18, new Date(2025, 5, 18), -51.477730, -0.010150); ``` * * * @@ -252,26 +253,26 @@ Gets the sunrise date and time in UTC expressed in an ISO 8601 format for date i **Kind**: global function **Returns**: string - A string representing sunrise date and time in UTC, expressed in an ISO 8601 format. -| Param | Type | Description | -| --- | --- | --- | -| date | Date | A date instance. | -| latitude | number | A latitude value in the range of -90 to 90. | +| Param | Type | Description | +| --------- | ------------------- | ---------------------------------------------- | +| date | Date | A date instance. | +| latitude | number | A latitude value in the range of -90 to 90. | | longitude | number | A longitude value in the range of -180 to 180. | **Example** *(Example usage of getSunriseDateTimeUtc)* ```js // returns "2025-01-18T07:57:29.802Z" -suntimes.getSunriseDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getSunriseDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getSunriseDateTimeUtc)* ```js // returns "The sun is up all day on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getSunriseDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getSunriseDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` **Example** *(Example usage of getSunriseDateTimeUtc)* ```js // returns "The sun is down all day on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -suntimes.getSunriseDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +getSunriseDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); ``` * * * @@ -282,26 +283,26 @@ Gets the sunset date and time in UTC expressed in an ISO 8601 format for date in **Kind**: global function **Returns**: string - A string representing sunset date and time in UTC, expressed in an ISO 8601 format. -| Param | Type | Description | -| --- | --- | --- | -| date | Date | A date instance. | -| latitude | number | A latitude value in the range of -90 to 90. | +| Param | Type | Description | +| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| date | Date | A date instance. | +| latitude | number | A latitude value in the range of -90 to 90. | | longitude | number | A longitude value in the range of -180 to 180. | **Example** *(Example usage of getSunsetDateTimeUtc)* ```js // returns "2025-01-18T16:23:11.903Z" -suntimes.getSunsetDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getSunsetDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getSunsetDateTimeUtc)* ```js // returns "The sun is up all day on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getSunsetDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getSunsetDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` **Example** *(Example usage of getSunsetDateTimeUtc)* ```js // returns "The sun is down all day on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -suntimes.getSunsetDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +getSunsetDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); ``` * * * @@ -321,17 +322,17 @@ Gets the end of civil dawn date and time in UTC expressed in an ISO 8601 format **Example** *(Example usage of getCivilDawnEndDateTimeUtc)* ```js // returns "2025-01-18T07:57:29.802Z" -suntimes.getCivilDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getCivilDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getCivilDawnEndDateTimeUtc)* ```js // returns "The sun is up all day on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getCivilDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getCivilDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` **Example** *(Example usage of getCivilDawnEndDateTimeUtc)* ```js // returns "The sun is down all day on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45 -suntimes.getCivilDawnEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +getCivilDawnEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); ``` * * * @@ -342,6 +343,7 @@ Gets the start of civil dawn date and time in UTC expressed in an ISO 8601 forma **Kind**: global function **Returns**: string - A string representing the start of civil dawn date and time in UTC, expressed in an ISO 8601 format. + | Param | Type | Description | | --- | --- | --- | | date | Date | A date instance. | @@ -351,17 +353,17 @@ Gets the start of civil dawn date and time in UTC expressed in an ISO 8601 forma **Example** *(Example usage of getCivilDawnStartDateTimeUtc)* ```js // returns "2025-01-18T07:19:15.781Z" -suntimes.getCivilDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getCivilDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getCivilDawnStartDateTimeUtc)* ```js // returns "The sun's altitude does not rise to -6° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -suntimes.getCivilDawnStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +getCivilDawnStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); ``` **Example** *(Example usage of getCivilDawnStartDateTimeUtc)* ```js // returns "The sun's altitude does not drop to -6° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getCivilDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getCivilDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` * * * @@ -381,17 +383,17 @@ Gets the end of nautical dawn date and time in UTC expressed in an ISO 8601 form **Example** *(Example usage of getNauticalDawnEndDateTimeUtc)* ```js // returns "2025-01-18T07:19:15.781Z" -suntimes.getNauticalDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getNauticalDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getNauticalDawnEndDateTimeUtc)* ```js // returns "The sun's altitude does not rise to -6° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -suntimes.getNauticalDawnEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +getNauticalDawnEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); ``` **Example** *(Example usage of getNauticalDawnEndDateTimeUtc)* ```js // returns "The sun's altitude does not drop to -6° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getNauticalDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getNauticalDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` * * * @@ -411,17 +413,17 @@ Gets the start of nautical dawn date and time in UTC expressed in an ISO 8601 fo **Example** *(Example usage of getNauticalDawnStartDateTimeUtc)* ```js // returns "2025-01-18T06:37:36.892Z" -suntimes.getNauticalDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getNauticalDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getNauticalDawnStartDateTimeUtc)* ```js // returns "The sun's altitude does not drop to -12° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getNauticalDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getNauticalDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` **Example** *(Example usage of getNauticalDawnStartDateTimeUtc)* ```js // returns "The sun's altitude does not rise to -12° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -suntimes.getNauticalDawnStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +getNauticalDawnStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); ``` * * * @@ -441,12 +443,12 @@ Gets the end of astronomical dawn date and time in UTC expressed in an ISO 8601 **Example** *(Example usage of getAstronomicalDawnEndDateTimeUtc)* ```js // returns "2025-01-18T06:37:36.892Z" -suntimes.getAstronomicalDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getAstronomicalDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getAstronomicalDawnEndDateTimeUtc)* ```js // returns "The sun's altitude does not drop to -12° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getAstronomicalDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getAstronomicalDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` * * * @@ -466,12 +468,12 @@ Gets the start of astronomical dawn date and time in UTC expressed in an ISO 860 **Example** *(Example usage of getAstronomicalDawnStartDateTimeUtc)* ```js // returns "2025-01-18T05:57:45.720Z" -suntimes.getAstronomicalDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getAstronomicalDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getAstronomicalDawnStartDateTimeUtc)* ```js // returns "The sun's altitude does not drop to -18° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getAstronomicalDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getAstronomicalDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` * * * @@ -491,12 +493,12 @@ Gets the start of astronomical dusk date and time in UTC expressed in an ISO 860 **Example** *(Example usage of getAstronomicalDuskStartDateTimeUtc)* ```js // returns "2025-01-18T17:43:04.813Z" -suntimes.getAstronomicalDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getAstronomicalDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getAstronomicalDuskStartDateTimeUtc)* ```js // returns "The sun's altitude does not drop to -12° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getAstronomicalDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getAstronomicalDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` * * * @@ -516,12 +518,12 @@ Gets the end of astronomical dusk date and time in UTC expressed in an ISO 8601 **Example** *(Example usage of getAstronomicalDuskEndDateTimeUtc)* ```js // returns "2025-01-18T18:22:55.985Z" -suntimes.getAstronomicalDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getAstronomicalDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getAstronomicalDuskEndDateTimeUtc)* ```js // returns "The sun's altitude does not drop to -18° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getAstronomicalDuskEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getAstronomicalDuskEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` * * * @@ -541,17 +543,17 @@ Gets the end of nautical dusk date and time in UTC expressed in an ISO 8601 form **Example** *(Example usage of getNauticalDuskEndDateTimeUtc)* ```js // returns "2025-01-18T17:43:04.813Z" -suntimes.getNauticalDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getNauticalDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getNauticalDuskEndDateTimeUtc)* ```js // returns The sun's altitude does not rise to -12° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45 -suntimes.getNauticalDuskEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +getNauticalDuskEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); ``` **Example** *(Example usage of getNauticalDuskEndDateTimeUtc)* ```js // returns "The sun's altitude does not drop to -12° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getNauticalDuskEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getNauticalDuskEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` * * * @@ -571,17 +573,17 @@ Gets the start of nautical dusk date and time in UTC expressed in an ISO 8601 fo **Example** *(Example usage of getNauticalDuskStartDateTimeUtc)* ```js // returns "2025-01-18T17:01:25.924Z" -suntimes.getNauticalDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getNauticalDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getNauticalDuskStartDateTimeUtc)* ```js // returns The sun's altitude does not rise to -6° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45 -suntimes.getNauticalDuskStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +getNauticalDuskStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); ``` **Example** *(Example usage of getNauticalDuskStartDateTimeUtc)* ```js // returns "The sun's altitude does not drop to -6° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getNauticalDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getNauticalDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` * * * @@ -601,17 +603,17 @@ Gets the end of civil dusk date and time in UTC expressed in an ISO 8601 format **Example** *(Example usage of getCivilDuskEndDateTimeUtc)* ```js // returns "2025-01-18T17:01:25.924Z" -suntimes.getCivilDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getCivilDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getCivilDuskEndDateTimeUtc)* ```js returns "The sun's altitude does not drop to -6° on Wed Jun 18 2025 at latitude -75.100620 and longitude 123.354750" -suntimes.getCivilDuskEndDateTimeUtc(new Date(2002, 0, 27), -75.100620, 123.354750); +getCivilDuskEndDateTimeUtc(new Date(2002, 0, 27), -75.100620, 123.354750); ``` -**Example** *(Example usage of getCivilDuskEndDateTimeUtc)* +**Example** *(Example usage of getNauticalDuskEndDateTimeUtc)* ```js // returns The sun's altitude does not rise to -6° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45 -suntimes.getCivilDuskEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +getCivilDuskEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); ``` * * * @@ -622,6 +624,7 @@ Gets the start of civil dusk date and time in UTC expressed in an ISO 8601 forma **Kind**: global function **Returns**: string - A string representing the start of civil dusk date and time in UTC, expressed in an ISO 8601 format. + | Param | Type | Description | | --- | --- | --- | | date | Date | A date instance. | @@ -631,20 +634,20 @@ Gets the start of civil dusk date and time in UTC expressed in an ISO 8601 forma **Example** *(Example usage of getCivilDuskStartDateTimeUtc)* ```js // returns "2025-01-18T16:23:11.903Z" -suntimes.getCivilDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +getCivilDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); ``` **Example** *(Example usage of getCivilDuskStartDateTimeUtc)* ```js returns "The sun's altitude does not rise to -6° on Wed Jun 18 2025 at latitude -75.100620 and longitude 123.354750" -suntimes.getCivilDuskStartDateTimeUtc(new Date(2002, 0, 27), -75.100620, 123.354750); +getCivilDuskStartDateTimeUtc(new Date(2002, 0, 27), -75.100620, 123.354750); ``` **Example** *(Example usage of getCivilDuskStartDateTimeUtc)* ```js // returns "The sun is up all day on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -suntimes.getCivilDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +getCivilDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); ``` **Example** *(Example usage of getCivilDuskStartDateTimeUtc)* ```js // returns "The sun is down all day on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -suntimes.getCivilDuskStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +getCivilDuskStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); ``` \ No newline at end of file diff --git a/src/declination/getDeclinationOfTheSun.js b/src/declination/getDeclinationOfTheSun.js index adc6d01..cb8b19b 100644 --- a/src/declination/getDeclinationOfTheSun.js +++ b/src/declination/getDeclinationOfTheSun.js @@ -54,11 +54,12 @@ const declinationOfTheSunFactory = (sine, cosine, arcsine, getDayOfTheYear) => { return Object.freeze({ /** * The angular distance of the sun north or south of the earth's equator. -* @example Example usage of getDeclinationOfTheSun. +* @example Example usage of getDeclinationOfTheSun * // returns -23.078780854838076 -* suntimes.getDeclinationOfTheSun(new Date(2019, 0, 1)); +* getDeclinationOfTheSun(new Date(2019, 0, 1)); * @param {Date} date - A date instance * @returns {number} The declination in degrees where north is a positive value and south is a negative value within a range of range of -23.45 and 23.45. +* @function */ getDeclinationOfTheSun: (date) => getDeclinationOfTheSun(date) }); diff --git a/src/equationOfTime/equationOfTime.js b/src/equationOfTime/equationOfTime.js index 60b622e..a232c7d 100644 --- a/src/equationOfTime/equationOfTime.js +++ b/src/equationOfTime/equationOfTime.js @@ -1,10 +1,11 @@ /** * The correction between standard clock time and the time based on the exact position of the sun in the sky represented as decimal time in minutes. -* @example Example usage of equationOfTime. +* @example Example usage of equationOfTime * // returns -10.306964615344999 -* suntimes.equationOfTime(new Date(2025, 0, 18)); +* equationOfTime(new Date(2025, 0, 18)); * @param {Date} date - A date instance. * @returns {number} A number whose value is the equation of time in minutes decimal time for the Date represented by date. +* @function */ const equationOfTime = date => { if (!date) { diff --git a/src/hourAngle/getHourAngle.js b/src/hourAngle/getHourAngle.js index cc0e987..3a2b47e 100644 --- a/src/hourAngle/getHourAngle.js +++ b/src/hourAngle/getHourAngle.js @@ -60,13 +60,14 @@ const getHourAngleFactory = ( * Gets the hour angle difference between noon and the angle value. * @example Example usage of getHourAngleSinceNoon * // returns 5.54554469317797 -* suntimes.getHourAngleSinceNoon(new Date(2025, 0, 18), 51.477730, -12); +* getHourAngleSinceNoon(new Date(2025, 0, 18), 51.477730, -12); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} angle - An angle value. * @throws {RangeError} The sun altitude never elevates above the angle specified. * @throws {RangeError} The sun altitude never drops below the angle specified. * @returns {number} A number whose value represents the hour angle since noon for the date, latitude and angle value. +* @function */ getHourAngleSinceNoon: (date, latitude, angle) => getHourAngleSinceNoon(date, latitude, angle) }); diff --git a/src/hourAngle/getNoonHourAngle.js b/src/hourAngle/getNoonHourAngle.js index 27d848e..d7beed7 100644 --- a/src/hourAngle/getNoonHourAngle.js +++ b/src/hourAngle/getNoonHourAngle.js @@ -34,10 +34,11 @@ const getNoonHourAngleFactory = equationOfTime => { * Gets the noon hour angle for the date and longitude value. * @example Example usage of getNoonHourAngle * // returns 12.17245941025575 -* suntimes.getNoonHourAngle(new Date(2025, 0, 18), -0.010150); +* getNoonHourAngle(new Date(2025, 0, 18), -0.010150); * @param {Date} date - A date instance. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {number} The noon hour angle expressed as a number between 0.00 and 23.9. +* @function */ getNoonHourAngle: (date, longitude) => getNoonHourAngle(date, longitude) }); diff --git a/src/index.js b/src/index.js index a955ce4..2d3d54b 100644 --- a/src/index.js +++ b/src/index.js @@ -22,47 +22,26 @@ import { getCivilDuskStartDateTimeUtc } from './time/index'; -const suntimes = Object.freeze({ - getNoonDateTimeUtc, - getDateTimeUtcOfAngleBeforeNoon, - getDateTimeUtcOfAngleAfterNoon, +export { getSunriseDateTimeUtc, getSunsetDateTimeUtc, + getNoonDateTimeUtc, getCivilDawnEndDateTimeUtc, getCivilDawnStartDateTimeUtc, getNauticalDawnEndDateTimeUtc, getNauticalDawnStartDateTimeUtc, getAstronomicalDawnEndDateTimeUtc, getAstronomicalDawnStartDateTimeUtc, - getAstronomicalDuskStartDateTimeUtc, getAstronomicalDuskEndDateTimeUtc, + getAstronomicalDuskStartDateTimeUtc, getNauticalDuskEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, getCivilDuskEndDateTimeUtc, - getCivilDuskStartDateTimeUtc -}); - -export default suntimes; -export { + getCivilDuskStartDateTimeUtc, getDeclinationOfTheSun, equationOfTime, getHourAngleSinceNoon, getNoonHourAngle, - getNoonDateTimeUtc, getDateTimeUtcOfAngleBeforeNoon, - getDateTimeUtcOfAngleAfterNoon, - getSunriseDateTimeUtc, - getSunsetDateTimeUtc, - getCivilDawnEndDateTimeUtc, - getCivilDawnStartDateTimeUtc, - getNauticalDawnEndDateTimeUtc, - getNauticalDawnStartDateTimeUtc, - getAstronomicalDawnEndDateTimeUtc, - getAstronomicalDawnStartDateTimeUtc, - getAstronomicalDuskStartDateTimeUtc, - getAstronomicalDuskEndDateTimeUtc, - getNauticalDuskEndDateTimeUtc, - getNauticalDuskStartDateTimeUtc, - getCivilDuskEndDateTimeUtc, - getCivilDuskStartDateTimeUtc + getDateTimeUtcOfAngleAfterNoon }; diff --git a/src/time/index.js b/src/time/index.js index ce9d823..4e96d64 100644 --- a/src/time/index.js +++ b/src/time/index.js @@ -20,10 +20,11 @@ const getNoonHourAngle = noonHourAngleFactory.getNoonHourAngle; * Gets the noon date and time in UTC expressed in an ISO 8601 format for date and longitude value. * @example Example usage of getNoonDateTimeUtc * // returns "2025-01-18T12:10:20.853Z" -* suntimes.getNoonDateTimeUtc(new Date(2025, 0, 18), -0.010150); +* getNoonDateTimeUtc(new Date(2025, 0, 18), -0.010150); * @param {Date} date - A date instance. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing noon date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getNoonDateTimeUtc = (date, longitude) => toUtcDateTime(date, getNoonHourAngle(date, longitude)).toISOString(); @@ -52,18 +53,19 @@ const astronomicalAngle = -18; * Gets the date and time in UTC expressed in an ISO 8601 format for an angle before noon for the angle, date, latitude and longitude value. * @example Example usage of getDateTimeUtcOfAngleBeforeNoon * // returns "2025-01-18T05:57:45.720Z" -* suntimes.getDateTimeUtcOfAngleBeforeNoon(-18, new Date(2025, 0, 18), 51.477730, -0.010150); +* getDateTimeUtcOfAngleBeforeNoon(-18, new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getDateTimeUtcOfAngleBeforeNoon * // returns "The sun's altitude does not drop to -18° on Wed Jun 18 2025 at latitude 51.47773 and longitude -0.01015" -* suntimes.getDateTimeUtcOfAngleBeforeNoon(-18, new Date(2025, 5, 18), 51.477730, -0.010150); +* getDateTimeUtcOfAngleBeforeNoon(-18, new Date(2025, 5, 18), 51.477730, -0.010150); * @example Example usage of getDateTimeUtcOfAngleBeforeNoon * // returns "The sun's altitude does not rise to 18° on Wed Jun 18 2025 at latitude -51.47773 and longitude -0.01015" -* suntimes.getDateTimeUtcOfAngleBeforeNoon(18, new Date(2025, 5, 18), -51.477730, -0.010150); +* getDateTimeUtcOfAngleBeforeNoon(18, new Date(2025, 5, 18), -51.477730, -0.010150); * @param {number} angle - An angle value. * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the time and date for an angle before noon in UTC, expressed in an ISO 8601 format. +* @function */ const getDateTimeUtcOfAngleBeforeNoon = (angle, date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleBeforeNoon(angle, date, latitude, longitude), @@ -74,18 +76,19 @@ const getDateTimeUtcOfAngleBeforeNoon = (angle, date, latitude, longitude) => * Gets the date and time in UTC expressed in an ISO 8601 format for an angle after noon for the angle, date, latitude and longitude value. * @example Example usage of getDateTimeUtcOfAngleAfterNoon * //returns "2025-06-18T14:33:42.689Z" -* suntimes.getDateTimeUtcOfAngleAfterNoon(8, new Date(2025, 5, 18), -51.477730, -0.010150); +* getDateTimeUtcOfAngleAfterNoon(8, new Date(2025, 5, 18), -51.477730, -0.010150); * @example Example usage of getDateTimeUtcOfAngleAfterNoon * // returns "The sun's altitude does not drop to -18° on Sat Jan 18 2025 at latitude -51.47773 and longitude -0.01015" -* suntimes.getDateTimeUtcOfAngleAfterNoon(-18, new Date(2025, 0, 18), -51.477730, -0.010150); +* getDateTimeUtcOfAngleAfterNoon(-18, new Date(2025, 0, 18), -51.477730, -0.010150); * @example Example usage of getDateTimeUtcOfAngleAfterNoon * // returns "The sun's altitude does not rise to 18° on Wed Jun 18 2025 at latitude -51.47773 and longitude -0.01015" -* suntimes.getDateTimeUtcOfAngleAfterNoon(18, new Date(2025, 5, 18), -51.477730, -0.010150); +* getDateTimeUtcOfAngleAfterNoon(18, new Date(2025, 5, 18), -51.477730, -0.010150); * @param {number} angle - An angle value. * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the time and date for an angle after noon in UTC, expressed in an ISO 8601 format. +* @function */ const getDateTimeUtcOfAngleAfterNoon = (angle, date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleAfterNoon(angle, date, latitude, longitude), @@ -96,17 +99,18 @@ const getDateTimeUtcOfAngleAfterNoon = (angle, date, latitude, longitude) => * Gets the sunrise date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getSunriseDateTimeUtc * // returns "2025-01-18T07:57:29.802Z" -* suntimes.getSunriseDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getSunriseDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getSunriseDateTimeUtc * // returns "The sun is up all day on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getSunriseDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getSunriseDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @example Example usage of getSunriseDateTimeUtc * // returns "The sun is down all day on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -* suntimes.getSunriseDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getSunriseDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing sunrise date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getSunriseDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleBeforeNoon(sunriseAngle, date, latitude, longitude), @@ -117,17 +121,18 @@ const getSunriseDateTimeUtc = (date, latitude, longitude) => * Gets the sunset date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getSunsetDateTimeUtc * // returns "2025-01-18T16:23:11.903Z" -* suntimes.getSunsetDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getSunsetDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getSunsetDateTimeUtc * // returns "The sun is up all day on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getSunsetDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getSunsetDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @example Example usage of getSunsetDateTimeUtc * // returns "The sun is down all day on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -* suntimes.getSunsetDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getSunsetDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing sunset date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getSunsetDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleAfterNoon(sunsetAngle, date, latitude, longitude), @@ -138,17 +143,18 @@ const getSunsetDateTimeUtc = (date, latitude, longitude) => * Gets the end of civil dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getCivilDawnEndDateTimeUtc * // returns "2025-01-18T07:57:29.802Z" -* suntimes.getCivilDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getCivilDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getCivilDawnEndDateTimeUtc * // returns "The sun is up all day on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getCivilDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getCivilDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @example Example usage of getCivilDawnEndDateTimeUtc * // returns "The sun is down all day on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45 -* suntimes.getCivilDawnEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getCivilDawnEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the end of civil dawn date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getCivilDawnEndDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleBeforeNoon(sunriseAngle, date, latitude, longitude), @@ -159,17 +165,18 @@ const getCivilDawnEndDateTimeUtc = (date, latitude, longitude) => * Gets the start of civil dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getCivilDawnStartDateTimeUtc * // returns "2025-01-18T07:19:15.781Z" -* suntimes.getCivilDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getCivilDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getCivilDawnStartDateTimeUtc * // returns "The sun's altitude does not rise to -6° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -* suntimes.getCivilDawnStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getCivilDawnStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @example Example usage of getCivilDawnStartDateTimeUtc * // returns "The sun's altitude does not drop to -6° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getCivilDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getCivilDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the start of civil dawn date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getCivilDawnStartDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleBeforeNoon(civilAngle, date, latitude, longitude), @@ -179,17 +186,18 @@ const getCivilDawnStartDateTimeUtc = (date, latitude, longitude) => * Gets the end of nautical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getNauticalDawnEndDateTimeUtc * // returns "2025-01-18T07:19:15.781Z" -* suntimes.getNauticalDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getNauticalDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getNauticalDawnEndDateTimeUtc * // returns "The sun's altitude does not rise to -6° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -* suntimes.getNauticalDawnEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getNauticalDawnEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @example Example usage of getNauticalDawnEndDateTimeUtc * // returns "The sun's altitude does not drop to -6° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getNauticalDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getNauticalDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the end of nautical dawn date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getNauticalDawnEndDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleBeforeNoon(civilAngle - epsilon, date, latitude, longitude), @@ -199,17 +207,18 @@ const getNauticalDawnEndDateTimeUtc = (date, latitude, longitude) => * Gets the start of nautical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getNauticalDawnStartDateTimeUtc * // returns "2025-01-18T06:37:36.892Z" -* suntimes.getNauticalDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getNauticalDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getNauticalDawnStartDateTimeUtc * // returns "The sun's altitude does not drop to -12° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getNauticalDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getNauticalDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @example Example usage of getNauticalDawnStartDateTimeUtc * // returns "The sun's altitude does not rise to -12° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -* suntimes.getNauticalDawnStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getNauticalDawnStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the start of nautical dawn date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getNauticalDawnStartDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleBeforeNoon(nauticalAngle, date, latitude, longitude), @@ -219,14 +228,15 @@ const getNauticalDawnStartDateTimeUtc = (date, latitude, longitude) => * Gets the end of astronomical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getAstronomicalDawnEndDateTimeUtc * // returns "2025-01-18T06:37:36.892Z" -* suntimes.getAstronomicalDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getAstronomicalDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getAstronomicalDawnEndDateTimeUtc * // returns "The sun's altitude does not drop to -12° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getAstronomicalDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getAstronomicalDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the end of astronomical dawn date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getAstronomicalDawnEndDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleBeforeNoon(nauticalAngle - epsilon, date, latitude, longitude), @@ -236,14 +246,15 @@ const getAstronomicalDawnEndDateTimeUtc = (date, latitude, longitude) => * Gets the start of astronomical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getAstronomicalDawnStartDateTimeUtc * // returns "2025-01-18T05:57:45.720Z" -* suntimes.getAstronomicalDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getAstronomicalDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getAstronomicalDawnStartDateTimeUtc * // returns "The sun's altitude does not drop to -18° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getAstronomicalDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getAstronomicalDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the start of astronomical dawn date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getAstronomicalDawnStartDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleBeforeNoon(astronomicalAngle, date, latitude, longitude), @@ -253,14 +264,15 @@ const getAstronomicalDawnStartDateTimeUtc = (date, latitude, longitude) => * Gets the start of astronomical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getAstronomicalDuskStartDateTimeUtc * // returns "2025-01-18T17:43:04.813Z" -* suntimes.getAstronomicalDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getAstronomicalDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getAstronomicalDuskStartDateTimeUtc * // returns "The sun's altitude does not drop to -12° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getAstronomicalDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getAstronomicalDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the start of astronomical dusk date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getAstronomicalDuskStartDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleAfterNoon(nauticalAngle - epsilon, date, latitude, longitude), @@ -270,14 +282,15 @@ const getAstronomicalDuskStartDateTimeUtc = (date, latitude, longitude) => * Gets the end of astronomical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getAstronomicalDuskEndDateTimeUtc * // returns "2025-01-18T18:22:55.985Z" -* suntimes.getAstronomicalDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getAstronomicalDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getAstronomicalDuskEndDateTimeUtc * // returns "The sun's altitude does not drop to -18° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getAstronomicalDuskEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getAstronomicalDuskEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the end of astronomical dusk date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getAstronomicalDuskEndDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleAfterNoon(astronomicalAngle, date, latitude, longitude), @@ -287,17 +300,18 @@ const getAstronomicalDuskEndDateTimeUtc = (date, latitude, longitude) => * Gets the end of nautical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getNauticalDuskEndDateTimeUtc * // returns "2025-01-18T17:43:04.813Z" -* suntimes.getNauticalDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getNauticalDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getNauticalDuskEndDateTimeUtc * // returns The sun's altitude does not rise to -12° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45 -* suntimes.getNauticalDuskEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getNauticalDuskEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @example Example usage of getNauticalDuskEndDateTimeUtc * // returns "The sun's altitude does not drop to -12° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getNauticalDuskEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getNauticalDuskEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the end of nautical dusk date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getNauticalDuskEndDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleAfterNoon(nauticalAngle, date, latitude, longitude), @@ -307,17 +321,18 @@ const getNauticalDuskEndDateTimeUtc = (date, latitude, longitude) => * Gets the start of nautical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getNauticalDuskStartDateTimeUtc * // returns "2025-01-18T17:01:25.924Z" -* suntimes.getNauticalDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getNauticalDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getNauticalDuskStartDateTimeUtc * // returns The sun's altitude does not rise to -6° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45 -* suntimes.getNauticalDuskStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getNauticalDuskStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @example Example usage of getNauticalDuskStartDateTimeUtc * // returns "The sun's altitude does not drop to -6° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getNauticalDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getNauticalDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the start of nautical dusk date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getNauticalDuskStartDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleAfterNoon(civilAngle - epsilon, date, latitude, longitude), @@ -327,17 +342,18 @@ const getNauticalDuskStartDateTimeUtc = (date, latitude, longitude) => * Gets the end of civil dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getCivilDuskEndDateTimeUtc * // returns "2025-01-18T17:01:25.924Z" -* suntimes.getCivilDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getCivilDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getCivilDuskEndDateTimeUtc * returns "The sun's altitude does not drop to -6° on Wed Jun 18 2025 at latitude -75.100620 and longitude 123.354750" -* suntimes.getCivilDuskEndDateTimeUtc(new Date(2002, 0, 27), -75.100620, 123.354750); +* getCivilDuskEndDateTimeUtc(new Date(2002, 0, 27), -75.100620, 123.354750); * @example Example usage of getNauticalDuskEndDateTimeUtc * // returns The sun's altitude does not rise to -6° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45 -* suntimes.getCivilDuskEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getCivilDuskEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the end of civil dusk date and time in UTC, expressed in an ISO 8601 format. +* @function */ const getCivilDuskEndDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleAfterNoon(civilAngle, date, latitude, longitude), @@ -351,16 +367,17 @@ const getCivilDuskEndDateTimeUtc = (date, latitude, longitude) => * @returns {string} A string representing the start of civil dusk date and time in UTC, expressed in an ISO 8601 format. * @example Example usage of getCivilDuskStartDateTimeUtc * // returns "2025-01-18T16:23:11.903Z" -* suntimes.getCivilDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getCivilDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getCivilDuskStartDateTimeUtc * returns "The sun's altitude does not rise to -6° on Wed Jun 18 2025 at latitude -75.100620 and longitude 123.354750" -* suntimes.getCivilDuskStartDateTimeUtc(new Date(2002, 0, 27), -75.100620, 123.354750); +* getCivilDuskStartDateTimeUtc(new Date(2002, 0, 27), -75.100620, 123.354750); * @example Example usage of getCivilDuskStartDateTimeUtc * // returns "The sun is up all day on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getCivilDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getCivilDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @example Example usage of getCivilDuskStartDateTimeUtc * // returns "The sun is down all day on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -* suntimes.getCivilDuskStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getCivilDuskStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* @function */ const getCivilDuskStartDateTimeUtc = (date, latitude, longitude) => perpetualEventHandler(() => dateTimeUtcOfAngleAfterNoon(sunsetAngle, date, latitude, longitude), diff --git a/suntimes.d.ts b/suntimes.d.ts index c5fd04c..63d667c 100644 --- a/suntimes.d.ts +++ b/suntimes.d.ts @@ -2,323 +2,341 @@ // Project: suntimes // Definitions by: Edonis Seferi https://github.com/doniseferi -export as namespace suntimes; - /** * The angular distance of the sun north or south of the earth's equator. -* @example Example usage of getDeclinationOfTheSun. +* @example Example usage of getDeclinationOfTheSun * // returns -23.078780854838076 -* suntimes.getDeclinationOfTheSun(new Date(2019, 0, 1)); +* getDeclinationOfTheSun(new Date(2019, 0, 1)); * @param {Date} date - A date instance * @returns {number} The declination in degrees where north is a positive value and south is a negative value within a range of range of -23.45 and 23.45. +* @function */ -export function getDeclinationOfTheSun(date: Date): number; +declare function getDeclinationOfTheSun(date: Date): number; /** * The correction between standard clock time and the time based on the exact position of the sun in the sky represented as decimal time in minutes. -* @example Example usage of equationOfTime. +* @example Example usage of equationOfTime * // returns -10.306964615344999 -* suntimes.equationOfTime(new Date(2025, 0, 18)); +* equationOfTime(new Date(2025, 0, 18)); * @param {Date} date - A date instance. * @returns {number} A number whose value is the equation of time in minutes decimal time for the Date represented by date. +* @function */ -export function equationOfTime(date: Date): number; +declare function equationOfTime(date: Date): number; /** * Gets the hour angle difference between noon and the angle value. * @example Example usage of getHourAngleSinceNoon * // returns 5.54554469317797 -* suntimes.getHourAngleSinceNoon(new Date(2025, 0, 18), 51.477730, -12); +* getHourAngleSinceNoon(new Date(2025, 0, 18), 51.477730, -12); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} angle - An angle value. * @throws {RangeError} The sun altitude never elevates above the angle specified. * @throws {RangeError} The sun altitude never drops below the angle specified. * @returns {number} A number whose value represents the hour angle since noon for the date, latitude and angle value. +* @function */ -export function getHourAngleSinceNoon(date: Date, latitude: number, angle: number): number; +declare function getHourAngleSinceNoon(date: Date, latitude: number, angle: number): number; /** * Gets the noon hour angle for the date and longitude value. * @example Example usage of getNoonHourAngle * // returns 12.17245941025575 -* suntimes.getNoonHourAngle(new Date(2025, 0, 18), -0.010150); +* getNoonHourAngle(new Date(2025, 0, 18), -0.010150); * @param {Date} date - A date instance. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {number} The noon hour angle expressed as a number between 0.00 and 23.9. +* @function */ -export function getNoonHourAngle(date: Date, longitude: number): number; +declare function getNoonHourAngle(date: Date, longitude: number): number; /** * Gets the noon date and time in UTC expressed in an ISO 8601 format for date and longitude value. * @example Example usage of getNoonDateTimeUtc * // returns "2025-01-18T12:10:20.853Z" -* suntimes.getNoonDateTimeUtc(new Date(2025, 0, 18), -0.010150); +* getNoonDateTimeUtc(new Date(2025, 0, 18), -0.010150); * @param {Date} date - A date instance. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing noon date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getNoonDateTimeUtc(date: Date, longitude: number): string; +declare function getNoonDateTimeUtc(date: Date, longitude: number): string; /** * Gets the date and time in UTC expressed in an ISO 8601 format for an angle before noon for the angle, date, latitude and longitude value. * @example Example usage of getDateTimeUtcOfAngleBeforeNoon * // returns "2025-01-18T05:57:45.720Z" -* suntimes.getDateTimeUtcOfAngleBeforeNoon(-18, new Date(2025, 0, 18), 51.477730, -0.010150); +* getDateTimeUtcOfAngleBeforeNoon(-18, new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getDateTimeUtcOfAngleBeforeNoon * // returns "The sun's altitude does not drop to -18° on Wed Jun 18 2025 at latitude 51.47773 and longitude -0.01015" -* suntimes.getDateTimeUtcOfAngleBeforeNoon(-18, new Date(2025, 5, 18), 51.477730, -0.010150); +* getDateTimeUtcOfAngleBeforeNoon(-18, new Date(2025, 5, 18), 51.477730, -0.010150); * @example Example usage of getDateTimeUtcOfAngleBeforeNoon * // returns "The sun's altitude does not rise to 18° on Wed Jun 18 2025 at latitude -51.47773 and longitude -0.01015" -* suntimes.getDateTimeUtcOfAngleBeforeNoon(18, new Date(2025, 5, 18), -51.477730, -0.010150); +* getDateTimeUtcOfAngleBeforeNoon(18, new Date(2025, 5, 18), -51.477730, -0.010150); * @param {number} angle - An angle value. * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the time and date for an angle before noon in UTC, expressed in an ISO 8601 format. +* @function */ -export function getDateTimeUtcOfAngleBeforeNoon(angle: number, date: Date, latitude: number, longitude: number): string; +declare function getDateTimeUtcOfAngleBeforeNoon(angle: number, date: Date, latitude: number, longitude: number): string; /** * Gets the date and time in UTC expressed in an ISO 8601 format for an angle after noon for the angle, date, latitude and longitude value. * @example Example usage of getDateTimeUtcOfAngleAfterNoon * //returns "2025-06-18T14:33:42.689Z" -* suntimes.getDateTimeUtcOfAngleAfterNoon(8, new Date(2025, 5, 18), -51.477730, -0.010150); +* getDateTimeUtcOfAngleAfterNoon(8, new Date(2025, 5, 18), -51.477730, -0.010150); * @example Example usage of getDateTimeUtcOfAngleAfterNoon * // returns "The sun's altitude does not drop to -18° on Sat Jan 18 2025 at latitude -51.47773 and longitude -0.01015" -* suntimes.getDateTimeUtcOfAngleAfterNoon(-18, new Date(2025, 0, 18), -51.477730, -0.010150); +* getDateTimeUtcOfAngleAfterNoon(-18, new Date(2025, 0, 18), -51.477730, -0.010150); * @example Example usage of getDateTimeUtcOfAngleAfterNoon * // returns "The sun's altitude does not rise to 18° on Wed Jun 18 2025 at latitude -51.47773 and longitude -0.01015" -* suntimes.getDateTimeUtcOfAngleAfterNoon(18, new Date(2025, 5, 18), -51.477730, -0.010150); +* getDateTimeUtcOfAngleAfterNoon(18, new Date(2025, 5, 18), -51.477730, -0.010150); * @param {number} angle - An angle value. * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the time and date for an angle after noon in UTC, expressed in an ISO 8601 format. +* @function */ -export function getDateTimeUtcOfAngleAfterNoon(angle: number, date: Date, latitude: number, longitude: number): string; +declare function getDateTimeUtcOfAngleAfterNoon(angle: number, date: Date, latitude: number, longitude: number): string; /** * Gets the sunrise date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getSunriseDateTimeUtc * // returns "2025-01-18T07:57:29.802Z" -* suntimes.getSunriseDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getSunriseDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getSunriseDateTimeUtc * // returns "The sun is up all day on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getSunriseDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getSunriseDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @example Example usage of getSunriseDateTimeUtc * // returns "The sun is down all day on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -* suntimes.getSunriseDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getSunriseDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing sunrise date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getSunriseDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getSunriseDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the sunset date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getSunsetDateTimeUtc * // returns "2025-01-18T16:23:11.903Z" -* suntimes.getSunsetDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getSunsetDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getSunsetDateTimeUtc * // returns "The sun is up all day on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getSunsetDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getSunsetDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @example Example usage of getSunsetDateTimeUtc * // returns "The sun is down all day on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -* suntimes.getSunsetDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getSunsetDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing sunset date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getSunsetDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getSunsetDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the end of civil dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getCivilDawnEndDateTimeUtc * // returns "2025-01-18T07:57:29.802Z" -* suntimes.getCivilDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getCivilDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getCivilDawnEndDateTimeUtc * // returns "The sun is up all day on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getCivilDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getCivilDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @example Example usage of getCivilDawnEndDateTimeUtc * // returns "The sun is down all day on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45 -* suntimes.getCivilDawnEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getCivilDawnEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the end of civil dawn date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getCivilDawnEndDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getCivilDawnEndDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the start of civil dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getCivilDawnStartDateTimeUtc * // returns "2025-01-18T07:19:15.781Z" -* suntimes.getCivilDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getCivilDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getCivilDawnStartDateTimeUtc * // returns "The sun's altitude does not rise to -6° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -* suntimes.getCivilDawnStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getCivilDawnStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @example Example usage of getCivilDawnStartDateTimeUtc * // returns "The sun's altitude does not drop to -6° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getCivilDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getCivilDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the start of civil dawn date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getCivilDawnStartDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getCivilDawnStartDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the end of nautical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getNauticalDawnEndDateTimeUtc * // returns "2025-01-18T07:19:15.781Z" -* suntimes.getNauticalDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getNauticalDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getNauticalDawnEndDateTimeUtc * // returns "The sun's altitude does not rise to -6° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -* suntimes.getNauticalDawnEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getNauticalDawnEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @example Example usage of getNauticalDawnEndDateTimeUtc * // returns "The sun's altitude does not drop to -6° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getNauticalDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getNauticalDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the end of nautical dawn date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getNauticalDawnEndDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getNauticalDawnEndDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the start of nautical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getNauticalDawnStartDateTimeUtc * // returns "2025-01-18T06:37:36.892Z" -* suntimes.getNauticalDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getNauticalDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getNauticalDawnStartDateTimeUtc * // returns "The sun's altitude does not drop to -12° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getNauticalDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getNauticalDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @example Example usage of getNauticalDawnStartDateTimeUtc * // returns "The sun's altitude does not rise to -12° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -* suntimes.getNauticalDawnStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getNauticalDawnStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the start of nautical dawn date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getNauticalDawnStartDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getNauticalDawnStartDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the end of astronomical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getAstronomicalDawnEndDateTimeUtc * // returns "2025-01-18T06:37:36.892Z" -* suntimes.getAstronomicalDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getAstronomicalDawnEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getAstronomicalDawnEndDateTimeUtc * // returns "The sun's altitude does not drop to -12° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getAstronomicalDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getAstronomicalDawnEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the end of astronomical dawn date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getAstronomicalDawnEndDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getAstronomicalDawnEndDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the start of astronomical dawn date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getAstronomicalDawnStartDateTimeUtc * // returns "2025-01-18T05:57:45.720Z" -* suntimes.getAstronomicalDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getAstronomicalDawnStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getAstronomicalDawnStartDateTimeUtc * // returns "The sun's altitude does not drop to -18° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getAstronomicalDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getAstronomicalDawnStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the start of astronomical dawn date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getAstronomicalDawnStartDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getAstronomicalDawnStartDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the start of astronomical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getAstronomicalDuskStartDateTimeUtc * // returns "2025-01-18T17:43:04.813Z" -* suntimes.getAstronomicalDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getAstronomicalDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getAstronomicalDuskStartDateTimeUtc * // returns "The sun's altitude does not drop to -12° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getAstronomicalDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getAstronomicalDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the start of astronomical dusk date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getAstronomicalDuskStartDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getAstronomicalDuskStartDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the end of astronomical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getAstronomicalDuskEndDateTimeUtc * // returns "2025-01-18T18:22:55.985Z" -* suntimes.getAstronomicalDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getAstronomicalDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getAstronomicalDuskEndDateTimeUtc * // returns "The sun's altitude does not drop to -18° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getAstronomicalDuskEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getAstronomicalDuskEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the end of astronomical dusk date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getAstronomicalDuskEndDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getAstronomicalDuskEndDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the end of nautical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getNauticalDuskEndDateTimeUtc * // returns "2025-01-18T17:43:04.813Z" -* suntimes.getNauticalDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getNauticalDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getNauticalDuskEndDateTimeUtc * // returns The sun's altitude does not rise to -12° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45 -* suntimes.getNauticalDuskEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getNauticalDuskEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @example Example usage of getNauticalDuskEndDateTimeUtc * // returns "The sun's altitude does not drop to -12° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getNauticalDuskEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getNauticalDuskEndDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the end of nautical dusk date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getNauticalDuskEndDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getNauticalDuskEndDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the start of nautical dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getNauticalDuskStartDateTimeUtc * // returns "2025-01-18T17:01:25.924Z" -* suntimes.getNauticalDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getNauticalDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getNauticalDuskStartDateTimeUtc * // returns The sun's altitude does not rise to -6° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45 -* suntimes.getNauticalDuskStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getNauticalDuskStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @example Example usage of getNauticalDuskStartDateTimeUtc * // returns "The sun's altitude does not drop to -6° on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getNauticalDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getNauticalDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the start of nautical dusk date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getNauticalDuskStartDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getNauticalDuskStartDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the end of civil dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. * @example Example usage of getCivilDuskEndDateTimeUtc * // returns "2025-01-18T17:01:25.924Z" -* suntimes.getCivilDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getCivilDuskEndDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getCivilDuskEndDateTimeUtc * returns "The sun's altitude does not drop to -6° on Wed Jun 18 2025 at latitude -75.100620 and longitude 123.354750" -* suntimes.getCivilDuskEndDateTimeUtc(new Date(2002, 0, 27), -75.100620, 123.354750); +* getCivilDuskEndDateTimeUtc(new Date(2002, 0, 27), -75.100620, 123.354750); * @example Example usage of getNauticalDuskEndDateTimeUtc * // returns The sun's altitude does not rise to -6° on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45 -* suntimes.getCivilDuskEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getCivilDuskEndDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); * @param {Date} date - A date instance. * @param {number} latitude - A latitude value in the range of -90 to 90. * @param {number} longitude - A longitude value in the range of -180 to 180. * @returns {string} A string representing the end of civil dusk date and time in UTC, expressed in an ISO 8601 format. +* @function */ -export function getCivilDuskEndDateTimeUtc(date: Date, latitude: number, longitude: number): string; +declare function getCivilDuskEndDateTimeUtc(date: Date, latitude: number, longitude: number): string; /** * Gets the start of civil dusk date and time in UTC expressed in an ISO 8601 format for date instance, latitude and longitude value. @@ -328,15 +346,17 @@ export function getCivilDuskEndDateTimeUtc(date: Date, latitude: number, longitu * @returns {string} A string representing the start of civil dusk date and time in UTC, expressed in an ISO 8601 format. * @example Example usage of getCivilDuskStartDateTimeUtc * // returns "2025-01-18T16:23:11.903Z" -* suntimes.getCivilDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); +* getCivilDuskStartDateTimeUtc(new Date(2025, 0, 18), 51.477730, -0.010150); * @example Example usage of getCivilDuskStartDateTimeUtc * returns "The sun's altitude does not rise to -6° on Wed Jun 18 2025 at latitude -75.100620 and longitude 123.354750" -* suntimes.getCivilDuskStartDateTimeUtc(new Date(2002, 0, 27), -75.100620, 123.354750); +* getCivilDuskStartDateTimeUtc(new Date(2002, 0, 27), -75.100620, 123.354750); * @example Example usage of getCivilDuskStartDateTimeUtc * // returns "The sun is up all day on Sun Aug 02 2037 at latitude 71.98007 and longitude 102.47427" -* suntimes.getCivilDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); +* getCivilDuskStartDateTimeUtc(new Date(2037, 7, 2), 71.980070, 102.474270); * @example Example usage of getCivilDuskStartDateTimeUtc * // returns "The sun is down all day on Thu Jan 01 2032 at latitude 89.525 and longitude -30.45" -* suntimes.getCivilDuskStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* getCivilDuskStartDateTimeUtc(new Date(2032, 0, 1), 89.5250, -30.4500); +* @function */ -export function getCivilDuskStartDateTimeUtc(date: Date, latitude: number, longitude: number): string; \ No newline at end of file +declare function getCivilDuskStartDateTimeUtc(date: Date, latitude: number, longitude: number): string; +