lunarphase-calculator v1.1.0
Lunar-Phase-Calculator
To install:
$ npm i lunarphase-calculator -SThen require it in your program:
const lunarCalc = require("lunarphase-calculator");API
lunarCalc.getLunarDay(Date);Returns lunar day of specified or current Date Object.
lunarCalc.getLunarPhase(lunarDay);Returns lunar phase (lunarCalc.phases) of specified or current lunar day.
lunarCalc.getLunarPhaseMonth(Date);Returns an array of lunar phases (lunarCalc.phases) in specified or current month.
lunarCalc.getFullLunarPhase(lunarDay);Returns lunar phase (lunarCalc.phases) with simple ASCII-art of phase (lunarCalc.ASCIIArts) of specified or current lunar day.
lunarCalc.toJDN(Date, isGrigorian);Returns Julian Date Number (JDN) of specified or current Date Object. Second parameter is boolean, default is true.
lunarCalc.fromJDN(jdn, isGrigorian);Returns [year, month, date] of specified or current JDN. Second parameter is boolean, default is true.
lunarCalc.drawASCII(lunarPhase);Returns ASCII-art (lunarCalc.ASCIIArts) of specified or current lunar phase (lunarCalc.phases).
lunarCalc.phases;An Object of lunar phases.
lunarCalc.ASCII-arts;An object of ASCII-arts of lunar phases.