import{_ as a,c as i,a2 as n,o as e}from"./chunks/framework.BI-rd6Wj.js";const g=JSON.parse('{"title":"Gregorian to Lunar Calendar Conversion","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/to-lunar.md","filePath":"en/guide/to-lunar.md"}'),t={name:"en/guide/to-lunar.md"};function l(h,s,p,r,k,o){return e(),i("div",null,s[0]||(s[0]=[n(`
Tip
The lunar calendar, also known as the Chinese calendar, is referred to as the "Lunar Calendar" in this project.
Special Notes
2057-09-28
corresponds to the Lunar Calendar date: Ding Chou (Ox) Year, Eighth Month, Thirtieth Day;2097-08-07
corresponds to the Lunar Calendar date: Ding Si (Snake) Year, Seventh Month, First Day.// 2097-8-7
console.log(getLunarDate('2097-08-07'));
// 2057-9-28
console.log(getLunarDate('2057-09-28'));
// {
// date: "2057-09-28",
// lunarYear: 2057,
// lunarMon: 8,
// lunarDay: 30,
// isLeap: false,
// lunarDayCN: "三十",
// lunarMonCN: "八月",
// lunarYearCN: "二零五七",
// yearCyl: "丁丑",
// monCyl: "己酉",
// dayCyl: "戊子",
// zodiac: "牛"
// }
// Examples of non-leap and leap months
console.log(getLunarDate('2001-04-27'));
console.log(getLunarDate('2001-05-27'));
console.log(getLunarDatesInRange('2001-05-21', '2001-05-26'));