week

fun Date.week(settings: WeekSettings): DateRange

The range defining the week that this date falls within. The first day of the week will be determined by the provided settings.

fun Date.week(locale: Locale): DateRange

The range defining the week that this date falls within. The first day of the week will be the default associated with the provided locale.

Keep in mind that that the system's calendar settings may differ from that of the default locale on some platforms. To respect the system calendar settings, use WeekSettings.systemDefault instead.

fun DateTime.week(settings: WeekSettings): DateTimeInterval
fun OffsetDateTime.week(settings: WeekSettings): OffsetDateTimeInterval
fun ZonedDateTime.week(settings: WeekSettings): ZonedDateTimeInterval

The interval defining the week that this date-time falls within. The first day of the week will be determined by the provided settings.

fun DateTime.week(locale: Locale): DateTimeInterval
fun OffsetDateTime.week(locale: Locale): OffsetDateTimeInterval
fun ZonedDateTime.week(locale: Locale): ZonedDateTimeInterval

The interval defining the week that this date-time falls within. The first day of the week will be the default associated with the provided locale.

Keep in mind that that the system's calendar settings may differ from that of the default locale on some platforms. To respect the system calendar settings, use WeekSettings.systemDefault instead.

val Date.week: DateRange

The range defining the ISO week that this date falls within.

The ISO week starts on Monday and ends on Sunday.

val DateTime.week: DateTimeInterval
val OffsetDateTime.week: OffsetDateTimeInterval
val ZonedDateTime.week: ZonedDateTimeInterval

The interval defining the ISO week that this date-time falls within.

The ISO week starts on Monday and ends on Sunday.