MonthCalendar

data class MonthCalendar(val calendarSystem: CalendarSystem, val year: Int, val month: Int, val totalDaysInMonth: Int, val firstDayOfMonth: Int, val lastDayOfMonth: Int)(source)

The geometry of one month in a given CalendarSystem: enough to lay out a weekday grid without knowing which calendar it came from.

NepaliMonthCalendar is the Bikram Sambat-only equivalent that predates this type and stays the published shape of NepaliDatePickerState.displayedMonth. Use MonthCalendar when the calendar is a runtime choice, and toNepaliMonthCalendar / toMonthCalendar to move between them.

Constructors

Link copied to clipboard
constructor(calendarSystem: CalendarSystem, year: Int, month: Int, totalDaysInMonth: Int, firstDayOfMonth: Int, lastDayOfMonth: Int)

Properties

Link copied to clipboard

the calendar year and month are expressed in.

Link copied to clipboard

Leading blank cells before day 1 when the grid starts on Sunday.

Link copied to clipboard

the day of the week (1-7, 1 = Sunday) the month starts on.

Link copied to clipboard

the day of the week (1-7, 1 = Sunday) the month ends on.

Link copied to clipboard
val month: Int

the month (1-12). 1 is Baisakh in Bikram Sambat, January in Gregorian.

Link copied to clipboard

the number of days in the month (28-32, depending on the calendar).

Link copied to clipboard
val year: Int

the year in calendarSystem.

Functions

Link copied to clipboard
fun indexIn(years: IntRange): Int

The position of this month within years, counting 12 months per year.

Link copied to clipboard

Narrows this month to the Bikram Sambat-only NepaliMonthCalendar.