0.1.6 • Published 1 year ago
sunrise-js v0.1.6
sunrise-js
Based on the sunrise equation calculates a Javascript UTC Date approximating when sunrise and sunset will happen based on a specified latitude, longitude and Javascript Date.
Largely inspired by the rust-sunrise crate.
Usage
const twilight = require('sunrise-js');
const { sunrise, sunset } = twilight(
{ latitude: 0, longitude: 0 },
new Date('2023-02-10')
);