Low-level pure functions for calendar conversion. Most users should prefer the ChineseDate value object API. These functions are useful when you need fine-grained control or want to build custom logic on top of the core algorithms.
Convert JDE to lunar date (public API)
Given a JDE, determines the corresponding lunar date by finding the enclosing new moon and computing the cycle/year/month/day.
Calendar configuration
Julian Ephemeris Day
Lunar date value
// JDE for 2024-06-21fromJDE(CHINESE_CONFIG, 2460482.5)// { cycle: 78, year: 34, month: 5, leap: false, day: 6 } Copy
// JDE for 2024-06-21fromJDE(CHINESE_CONFIG, 2460482.5)// { cycle: 78, year: 34, month: 5, leap: false, day: 6 }
Low-level pure functions for calendar conversion. Most users should prefer the ChineseDate value object API. These functions are useful when you need fine-grained control or want to build custom logic on top of the core algorithms.