pub fn chinese_based_date_from_fixed<C: ChineseBased>(
date: RataDie,
) -> ChineseFromFixedResult
Expand description
Get a chinese based date from a fixed date, with the related ISO year
Months are calculated by iterating through the dates of new moons until finding the last month which does not exceed the given fixed date. The day of month is calculated by subtracting the fixed date from the fixed date of the beginning of the month.
The calculation for elapsed_years
and month
in this function are based on code from Calendrical Calculations by Reingold & Dershowitz.
Lisp reference code: https://github.com/EdReingold/calendar-code2/blob/main/calendar.l#L5414-L5459