const moon = require('the-moon');
Get today's moon
moon(); // π (today's moon)
Choose a different date
moon(2017); // π (today in 2017)
moon(2017, 3, 14); // π (a specific date)
Choose from available formats (moon.FORMATS
) default is icon
moon(2017, 3, 14, {format: 'code'}); // 'full-moon'
moon({format: 'name'}); // 'Last Quarter Moon'
format | example |
---|---|
icon | π |
code | full |
name | Full Moon |
Icon | Name | Code |
---|---|---|
π | New Moon | new |
π | Waxing Crescent Moon | waxing-crescent |
π | Quarter Moon | quarter |
π | Waxing Gibbous Moon | waxing-gibbous |
π | Full Moon | full |
π | Waning Gibbous Moon | waning-gibbous |
π | Last Quarter Moon | last-quarter |
π | Waning Crescent Moon | waning-crescent |
npx the-moon