Skip to content

//core/io.islandtime/week

week

common

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.

common

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 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.

common

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.

common

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 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.

common

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.

common

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.