sunrise-js
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

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')
);

Readme

Keywords

Package Sidebar

Install

npm i sunrise-js

Weekly Downloads

7

Version

0.1.6

License

MIT

Unpacked Size

9.76 kB

Total Files

27

Last publish

Collaborators

  • mehaslam