0.2.0 • Published 6 years ago

moonphase-js v0.2.0

Weekly downloads
22
License
MIT
Repository
-
Last release
6 years ago

Moonphase

MIT licensed Build Status codecov.io

Packege MoonPhase allow calculat the phase of Moon, and other related veriables. It's base on php-moon-phase

Usage

Add moonphase-js dependency:

$ yarn add moonphase-js

Now you can use it:

// index.js

1 const MoonPhase = require('moonphase-js')
2 
3 const m = new MoonPhase(new Date(2018, 09, 23))
4 
5 console.log((m.illum * 100) + ' %')

Run it:

$ node index.js
96.50252994209721 %

LICENSE

moonphase is released under the MIT License.

Acknowledgments

This package's code and documentation are very closely derived php-moon-phase PHP class for calculating the phase of the Moon created by Samir Shah.