DayOfWeek

A day of the week.

enum DayOfWeek : Enum<DayOfWeek>

Entries

MONDAY
Link copied to clipboard
common
TUESDAY
Link copied to clipboard
common
WEDNESDAY
Link copied to clipboard
common
THURSDAY
Link copied to clipboard
common
FRIDAY
Link copied to clipboard
common
SATURDAY
Link copied to clipboard
common
SUNDAY
Link copied to clipboard
common

Types

Companion
Link copied to clipboard
common
object Companion

Functions

compareTo
Link copied to clipboard
common
operator override fun compareTo(other: DayOfWeek): Int
displayName
Link copied to clipboard
common

A textual representation of the day, suitable for display purposes. The localized name will be returned, if available. If not, the ISO day of week number will be returned instead.

The result depends on the configured DateTimeTextProvider and may differ between platforms.

fun displayName(style: TextStyle, locale: Locale): String
equals
Link copied to clipboard
common
operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
override fun hashCode(): Int
localizedName
Link copied to clipboard
common

The localized name of the day, if available for the locale in the specified style. The result depends on the configured DateTimeTextProvider and may differ between platforms.

fun localizedName(style: TextStyle, locale: Locale): String?
minus
Link copied to clipboard
common

Subtracts days from this day of the week, wrapping when the beginning or end of the week is reached.

operator fun minus(days: IntDays): DayOfWeek
operator fun minus(days: LongDays): DayOfWeek
number
Link copied to clipboard
common

The day of week number (1-7) according to the provided settings. Typically, the week will start on either Monday, Sunday, or Saturday.

fun number(settings: WeekSettings): Int

The day of week number (1-7) according to the specified locale. Typically, the week will start on either Monday, Sunday, or Saturday. The number returned may differ between platforms.

fun number(locale: Locale): Int
plus
Link copied to clipboard
common

Adds days to this day of the week, wrapping when the beginning or end of the week is reached.

operator fun plus(days: IntDays): DayOfWeek
operator fun plus(days: LongDays): DayOfWeek
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

name
Link copied to clipboard
common
override val name: String
number
Link copied to clipboard
common

The ISO day of week number.

The ISO week starts on Monday (1) and ends on Sunday (7).

val number: Int
ordinal
Link copied to clipboard
common
override val ordinal: Int