core / io.islandtime / weekBasedYear

weekBasedYear

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) val Date.weekBasedYear: Int
val DateTime.weekBasedYear: Int
val OffsetDateTime.weekBasedYear: Int
val ZonedDateTime.weekBasedYear: Int

The week-based year used in the ISO week date system. This value differs from the regular ISO year when the week number falls in the preceding or following year.

See Also

weekOfWeekBasedYear

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) fun Date.weekBasedYear(settings: WeekSettings): Int
fun DateTime.weekBasedYear(settings: WeekSettings): Int
fun OffsetDateTime.weekBasedYear(settings: WeekSettings): Int
fun ZonedDateTime.weekBasedYear(settings: WeekSettings): Int

The week-based year, calculated using the week definition in settings. This value differs from the regular ISO year when the week number falls in the preceding or following year.

See Also

weekOfWeekBasedYear

(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) fun Date.weekBasedYear(locale: <ERROR CLASS>): Int
fun DateTime.weekBasedYear(locale: <ERROR CLASS>): Int
fun OffsetDateTime.weekBasedYear(locale: <ERROR CLASS>): Int
fun ZonedDateTime.weekBasedYear(locale: <ERROR CLASS>): Int

The week-based year, calculated using the week definition associated with the provided locale. This value differs from the regular ISO year when the week number falls in the preceding or following year.

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.

See Also

weekOfWeekBasedYear

(jvm) fun Date.weekBasedYear(locale: Locale): Int
fun DateTime.weekBasedYear(locale: Locale): Int
fun OffsetDateTime.weekBasedYear(locale: Locale): Int
fun ZonedDateTime.weekBasedYear(locale: Locale): Int

The week-based year, calculated using the week definition associated with the provided locale. This value differs from the regular ISO year when the week number falls in the preceding or following year.

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.

See Also

weekOfWeekBasedYear