CustomCalendar

data class CustomCalendar(val year: Int, val month: Int, val dayOfMonth: Int, val era: Int, val firstDayOfMonth: Int, val lastDayOfMonth: Int, val totalDaysInMonth: Int, val dayOfWeekInMonth: Int = -1, val dayOfWeek: Int = -1, val dayOfYear: Int = -1, val weekOfMonth: Int = -1, val weekOfYear: Int = -1)(source)

Represents a date in a custom calendar system with detailed information.

This data class holds information about a specific date, including its year, month, day, era (AD or BS), and various other properties related to the day and week within the month and year.

Constructors

Link copied to clipboard
constructor(year: Int, month: Int, dayOfMonth: Int, era: Int, firstDayOfMonth: Int, lastDayOfMonth: Int, totalDaysInMonth: Int, dayOfWeekInMonth: Int = -1, dayOfWeek: Int = -1, dayOfYear: Int = -1, weekOfMonth: Int = -1, weekOfYear: Int = -1)

Properties

Link copied to clipboard

The day of the month (1-32).

Link copied to clipboard

The day of the week (1-7, e.g., 1 for Sunday). Defaults to -1 if not applicable.

Link copied to clipboard

The number of times the day of the week occurs in the month (e.g., 5 for the fifth Friday of the month). Defaults to -1 if not applicable.

Link copied to clipboard

The day of the year (1-366). Defaults to -1 if not applicable.

Link copied to clipboard
val era: Int

The era of the calendar (1 for AD, 2 for BS).

Link copied to clipboard

The day of the week (1-7) for the first day of the month.

Link copied to clipboard

The day of the week (1-7) for the last day of the month.

Link copied to clipboard
val month: Int

The month in the custom calendar (1-12).

Link copied to clipboard

The total number of days in the month.

Link copied to clipboard

The week of the month (1-5). Defaults to -1 if not applicable.

Link copied to clipboard

The week of the year (1-54). Defaults to -1 if not applicable.

Link copied to clipboard
val year: Int

The year in the custom calendar.

Functions

Link copied to clipboard

Converts a CustomCalendar object to a SimpleDate object.