Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@modern-dev/daylight

modern-dev249MIT0.1.0TypeScript support: included

Daylight - is a tiny JavaScript library for basic sun/moon position/times/phase calculations.

daylight, sunrise, sunset, moonrise, moonset, astro, phase, fraction, twilight, dawn, dusk, nautical, civil, astronomical

readme

Daylight

Build Status codecov npm NPM

Daylight - is a tiny JavaScript library for basic sun/moon position/times/phase calculations.

`shell script $ npm install -save @modern-dev/daylight


## :clipboard: Usage

```js
import { sun, moon } from '@modern-dev/daylight';

const sunPosition = sun.getPosition(new Date(), 90.0, 45.0);
console.log('Sun\'s altitude at the South Pole is ', sunPosition.altitude);

const moonPahse = moon.getPhase(new Date());
console.log('Today\'s moon phase is ', moonPhase.phase);

:mortar_board: API Reference

Will be added soon.

:green_book: License

Licensed under the MIT license.

Copyright (c) 2020 Bohdan Shtepan


modern-dev.com  ·  GitHub @virtyaluk  ·  Twitter @virtyaluk