Skip to content

Releases: doniseferi/suntimes

v1.0.0-1

01 Nov 04:40
Compare
Choose a tag to compare
1.0.0-1

v1.0.0

01 Nov 04:46
Compare
Choose a tag to compare

v1.0.0

Test Results

Scientific decimal time to time

✔️ returns hours
✔️ returns minutes
✔️ returns seconds
✔️ returns milliseconds
✔️ returns the complete every time unit
✔️ throws an exception when the value is null, undefined or not a number

Get all dates for a year

✔️ returns every distinct date for a non leap year
✔️ returns every distinct date for a leap year

Get day of the year

✔️ returns the correct day of the year
✔️ returns day of the year for every day on a leap year
✔️ returns day of the year for every day on non leap year
✔️ throws exception when an invalid date is passed

Declination of the sun

✔️ returns the correct value in degrees within +/- 0.4 degree accuracy (115ms)
✔️ returns the number
✔️ throws an error if an invalid date is passed in

Declination Of The Sun Factory

✔️ throws an exception if you do not pass in all parameters
✔️ returns a get declination of the sun function

Equation of time

✔️ returns the correct equation of time with a margin of error of +/- 4 seconds (92ms)
✔️ throws an exception when an invalid date is passed in

Get Noon Time

✔️ returns noon time within a +/- 1 minute accuracy for the 01/01/2019
✔️ returns noon time within a +/- 1 minute accuracy for the 01/07/2019
✔️ East most location with a 12 hour offset returns correct noon datetime in utc
✔️ West most location with a 12 hour offset returns correct noon datetime in utc

Get Sunrise Time

✔️ returns sunrise time within a +/- 1 minute accuracy for the 01/01/2019
✔️ returns sunset time within a +/- 1 minute accuracy for the 01/07/2019

Get Sunset Time

✔️ returns sunset time within a +/- 1 minute accuracy for the 01/01/2019
✔️ returns sunset time within a +/- 1 minute accuracy for the 01/07/2019

Get twilight dawn date time

✔️ returns the astronomical dawn start time with an accuracy of 60 +/- seconds for 01/01/2022
✔️ returns the nautical dawn start time with an accuracy of 60 +/- seconds for 01/01/2022
✔️ returns the civil dawn start time with an accuracy of 60 +/- seconds for 01/01/2022

Get twilight dusk date time

✔️ returns the astronomical dusk start time with an accuracy of 60 +/- seconds for 01/01/2022
✔️ returns the nautical dusk start time with an accuracy of 60 +/- seconds for 01/01/2022
✔️ returns the civil dusk start time with an accuracy of 60 +/- seconds for 01/01/2022

Trigonometry objects

✔️ sine is equal to built in Math objects sin method
✔️ cosine is equal to built in Math objects cos method
✔️ arcsine is equal to built in Math objects asin method
✔️ arccosine is equal to built in Math objects asin method

Angle conversions

✔️ converts 1 degree to 0.01745rad
✔️ converts 1 radian to 57.296deg

Index

✔️ exports the sun object
✔️ the sun object exports every method

41 passing (322ms)

Coverage summary

Statements : 84.31% ( 274/325 )
Branches : 72.22% ( 52/72 )
Functions : 62.92% ( 56/89 )
Lines : 83.76% ( 263/314 )