Skip to content

Sunrise and sunset time calculation for given coordinates. ~1kb minified with zero dependencies.

Notifications You must be signed in to change notification settings

ALLTERCO/fast-sunrise-sunset

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fast-Sunrise-Sunset

This library is optimization of https://github.com/udivankin/sunrise-sunset for repeated large scale sunrise/sunset calculations for multiple location.

This library is probably NOT the library you're looking for. For one time or user driven sunrise/sunset calculation https://github.com/udivankin/sunrise-sunset has more user friendly interface.

For correct usage see src/__tests__





N.B. Some important bugs inherited from original lib where fixed. See udivankin#19 (comment)

N.B. This library results deviate with up to two minutes from more complicated calculations from https://www.suncalc.org/ and alike, but I find the results useful given how stretchy definition of sunrise/sunset can be.

About

Sunrise and sunset time calculation for given coordinates. ~1kb minified with zero dependencies.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 97.6%
  • JavaScript 2.4%