lunar-dates
v0.0.2
Published
Translate Gregorian calendar dates to lunar calendar dates used by Chinese worldwide.
Downloads
3
Readme
lunar-dates
Translate Gregorian calendar dates to lunar calendar dates used by Chinese worldwide. Holiday names and solar term names are also included. Available date range: 1901-01-20 to 2100-12-01.
Installation
npm install --save lunar-dates
Usage
const LunarCalendar = require('lunar-dates');
const cal = new LunarCalendar();
let startDate = new Date();
let numOfDays = 30;
let lunarDates = cal.getLunarDates(startDate, numOfDays); // [ {date, month, lunarDate, solarTerm, holiday}, ... ]