moonphase-js

0.2.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i moonphase-js

Weekly Downloads

2

Version

0.2.0

License

MIT

Unpacked Size

14.8 kB

Total Files

5

Last publish

Collaborators

  • janczer