Package-level declarations

Types

Link copied to clipboard
data class HijriDate(val year: Int, val month: Int, val day: Int, val variant: HijriVariant = HijriVariant.UmmAlQura)

A date in the Hijri (Islamic lunar) calendar. month is 1 (Muharram) .. 12 (Dhu al-Hijjah). Construction checks the month and that day is 1..30; toLocalDate also checks the day against the month length of variant.

Link copied to clipboard
class HijriDayInfoProvider(variant: HijriVariant = HijriVariant.UmmAlQura, strings: HijriStrings = HijriStrings.English) : DayInfoProvider

DayInfoProvider that labels each day with its Hijri date: the month name on the first day of a month, the day number otherwise. DayInfo.payload is the HijriDate, DayInfo.tags is ["hijri"] and DayInfo.priority is DayInfoPriority.SECONDARY, so a holiday provider combined with + wins the label.

Link copied to clipboard
class HijriStrings(val monthNames: List<String>, val digits: String = "0123456789")

Labels used by HijriDayInfoProvider: monthNames holds the 12 month names from Muharram, shown on the first day of each month; digits holds the ten digits 0..9 used for the other days' numbers.

Link copied to clipboard

Rule set used to convert between Gregorian and Hijri dates.

Functions

Link copied to clipboard

Number of days (29 or 30) in this date's month.

Link copied to clipboard
fun LocalDate.toHijriDate(variant: HijriVariant = HijriVariant.UmmAlQura): HijriDate

Converts this date to the Hijri calendar.

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

Converts this Hijri date to a Gregorian LocalDate.