lunarphase-calculator

1.1.0 • Public • Published

Lunar-Phase-Calculator

To install:

$ npm i lunarphase-calculator -S

Then 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.

/lunarphase-calculator/

    Package Sidebar

    Install

    npm i lunarphase-calculator

    Weekly Downloads

    5

    Version

    1.1.0

    License

    ISC

    Unpacked Size

    14.6 kB

    Total Files

    21

    Last publish

    Collaborators

    • antonymeow