|
CelestialCalendar 1.0.0 · unreleased development @ 67a7c4c79a4a4a6aa7e703c9e6f0039ae34bee82
|
Classes | |
| struct | LunarMonth |
| The metadata of a lunar month. More... | |
| struct | LunarMonthGenerator |
| Generate lunar-month metadata after a JDE(TT). 生成给定 JDE(TT) 后的阴历月元数据。 More... | |
| struct | LunarYearContext |
| The raw lunar year information, can be processed to LunarYear. More... | |
Typedefs | |
| using | LunarYear |
| using | LunarMonthChunk |
| A chunk of lunar months. | |
Functions | |
| auto | jde_to_utc8 (const double jde) -> calendar::Datetime |
| Convert a JDE (TT) moment to fixed-offset east-eight civil time for lunar date assignment. 把 JDE(TT)时刻转换为固定东八区民用时间,用于确定阴历日期。 | |
| auto | calc_lunar_month_chunks (int32_t year) -> std::pair< LunarMonthChunk, LunarMonthChunk > |
| Calculate the lunar month chunks for the given year. | |
| auto | leap_month_in_chunk (const LunarMonthChunk &chunk) -> std::optional< int32_t > |
| Get the leap month in the given chunk. | |
| auto | calc_lunar_year_start_moment (const LunarMonthChunk &chunk, std::optional< int32_t > leap_month) -> calendar::Datetime |
| Get the start moment of the lunar year. | |
| auto | create_lunar_year_context (int32_t year) -> LunarYearContext |
| Create a LunarYearContext for the given year, which basically contains the month info, including leap month. | |
| auto | calc_lunar_year (int32_t year) -> LunarYear |
| Calculate the lunar year information for the given year. 计算给定年份的阴历年信息。 | |
| auto | get_info_for_year (const int32_t year) -> LunarYear |
| Get the lunar year information for the given year, using cache. 返回给定年份的阴历年信息。使用缓存。 | |
| auto | bounds () -> const common::AlgoBounds & |
| The bounds of the algorithm, i.e. the supported range of lunar and Gregorian dates. | |
Variables | |
| constexpr int32_t | START_YEAR |
| The first supported lunar year. | |
| constexpr int32_t | END_YEAR |
| The last supported lunar year. | |
A chunk of lunar months.
A chunk is defined as a contiguous sequence of lunar months, from 11th month in a year (inclusive), to 11th month in the next year (exclusive).
|
inlinenodiscard |
The bounds of the algorithm, i.e. the supported range of lunar and Gregorian dates.
|
inlinenodiscard |
Calculate the lunar month chunks for the given year.
| year | The Lunar year. |
|
inlinenodiscard |
Calculate the lunar year information for the given year. 计算给定年份的阴历年信息。
| year | The Lunar year. 阴历年份。 |
|
inlinenodiscard |
Get the start moment of the lunar year.
| chunk | The chunk of lunar months. |
| leap_month | The index of the leap month in the given chunk. std::nullopt if there is no leap month. |
|
inlinenodiscard |
Create a LunarYearContext for the given year, which basically contains the month info, including leap month.
| year | The year to create the context for. |
|
inlinenodiscard |
Get the lunar year information for the given year, using cache. 返回给定年份的阴历年信息。使用缓存。
| year | The Lunar year. 阴历年份。 |
|
inlinenodiscard |
Convert a JDE (TT) moment to fixed-offset east-eight civil time for lunar date assignment. 把 JDE(TT)时刻转换为固定东八区民用时间,用于确定阴历日期。
| jde | The julian ephemeris day number, which is based on TT. 基于 TT 的儒略历书日。 |
Before 1972, jde_to_utc deliberately uses UT1 as a proxy because historical UTC is not modelled. From 1972 through the final announced leap-second step it uses the ΔAT table; beyond that table, ΔAT is held at 37 s. The fixed eight-hour offset is applied after that three-era conversion.
|
inlinenodiscard |
Get the leap month in the given chunk.
| chunk | The chunk of lunar months. |
|
inlineconstexpr |
The last supported lunar year.
|
inlineconstexpr |
The first supported lunar year.