Package-level declarations

Types

Link copied to clipboard

Which Chinese string set LunarDayInfoProvider renders.

Link copied to clipboard
data class LunarDate(val year: Int, val month: Int, val day: Int, val isLeapMonth: Boolean = false)

A date in the Chinese lunisolar calendar. month is 1..12; a leap month repeats its number.

Link copied to clipboard
class LunarDayInfoProvider(variant: ChineseVariant = ChineseVariant.SIMPLIFIED) : DayInfoProvider

DayInfoProvider backed by the Chinese lunisolar calendar: secondary labels follow the original CalendarView priority — solar term, then Gregorian festival (with Mother's/Father's/ Thanksgiving day as fallback), then traditional lunar festival, then the lunar day name.

Link copied to clipboard
data class LunarDayMetadata(val lunarDate: LunarDate, val solarTerm: SolarTerm? = null, val gregorianFestival: String? = null, val traditionalFestival: String? = null)

Structured lunisolar metadata attached to DayInfo.payload by LunarDayInfoProvider.

Link copied to clipboard

The 24 solar terms, ordinal order matching the original name table (0 = 春分, spring equinox).

Functions

Link copied to clipboard
Link copied to clipboard
fun solarTermsFor(year: Int): Map<LocalDate, SolarTerm>

All 24 solar-term dates falling inside Gregorian year (Beijing time, UTC+8), matching the original SolarTermUtil.getSolarTerms.

Link copied to clipboard
fun LunarDate.toLocalDate(): LocalDate

Converts a lunar date back to Gregorian. Valid for lunar years 1900..2099.

Link copied to clipboard
fun LocalDate.toLunarDate(): LunarDate

Converts a Gregorian date to its lunar equivalent. Valid for years 1900..2099.

Link copied to clipboard

Heavenly-stem / earthly-branch (干支) name of a Gregorian year, e.g. 2024 -> 甲辰.