~gjabell/dawn2dusk

84d4f6fd56ab74f570112e5634f0cc932ce01dda — Galen Abell 2 years ago 31e1bf8 main
Add attribution
2 files changed, 4 insertions(+), 0 deletions(-)

M README.md
M lib.go
M README.md => README.md +2 -0
@@ 2,6 2,8 @@

An offline CLI and library for calculating today's sunrise and sunset times.

Inspired by the functionality in [wlsunset](https://sr.ht/~kennylevinsen/wlsunset/) and reimplemented in Go.

## Installing

Requires Go.

M lib.go => lib.go +2 -0
@@ 5,6 5,8 @@ import (
	"time"
)

// Equations from: https://www.esrl.noaa.gov/gmd/grad/solcalc/solareqns.PDF

var zenith = degreesToRadians(90.833)

// CalculateSunriseAndSunset returns the sunrise and sunset times for the given