lun-phase
v0.1.1
Published
ask me about lunation
Downloads
7
Readme
lun-phase
You may receive:
- A numerical value representing the moon's age in the current lunation
- A numerical value representing the moon's phase
- An emoji representing the moon's phase
- The name of the current phase as a string
Usage
var Lun = require("lun-phase");
var lun = new Lun();
console.log(lun.now());
will return an object that looks something like this Your values will likely be different based on what day it is.
{
age: 6,
phase: 2,
emoji: ':first_quarter_moon:',
name: 'First Quarter Moon'
}
Notes
We deal in whole numbers because this is a wholly unscientific endeavor.
Thank you Ben Daglish for providing moon phase calculation methods.
- http://www.ben-daglish.net/moon.shtml