Package Exports
- celestial-moon
- celestial-moon/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (celestial-moon) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
celestial-moon
Calculate the moon phase.
This is an approximate calculation.
Install
$ npm i celestial-moon
Use
const moon = require('celestial-moon');
const phase = moon.calculate(2020, 11, 10, 9, 30, 0, 0);
console.log(phase.age); //since last new moon
console.log(phase.name); //'waning-crescent'
Contribute
Please feel free to contribute by creating a Pull Request including test code.