val Date.weekOfYear: Intval DateTime.weekOfYear: Intval OffsetDateTime.weekOfYear: Intval ZonedDateTime.weekOfYear: Int
The week of the year, calculated using the ISO week definition. If the week number is associated
with the preceding year, 0 will be returned.
To obtain the week number used in the ISO week date system, use weekOfWeekBasedYear instead.
See Also
fun Date.weekOfYear(settings: WeekSettings): Intfun DateTime.weekOfYear(settings: WeekSettings): Intfun OffsetDateTime.weekOfYear(settings: WeekSettings): Intfun ZonedDateTime.weekOfYear(settings: WeekSettings): Int
The week of the year, calculated using the week definition in settings. If the week number is
associated with the preceding year, 0 will be returned.
To obtain the week number of the week-based year, use weekOfWeekBasedYear instead.
See Also
fun Date.weekOfYear(locale: <ERROR CLASS>): Intfun DateTime.weekOfYear(locale: <ERROR CLASS>): Intfun OffsetDateTime.weekOfYear(locale: <ERROR CLASS>): Intfun ZonedDateTime.weekOfYear(locale: <ERROR CLASS>): Int
The week of the year, calculated using the week definition associated with the provided locale.
If the week number is associated with the preceding year, 0 will be returned.
To obtain the week number of the week-based year, use weekOfWeekBasedYear instead.
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
fun Date.weekOfYear(locale: Locale): Intfun DateTime.weekOfYear(locale: Locale): Intfun OffsetDateTime.weekOfYear(locale: Locale): Intfun ZonedDateTime.weekOfYear(locale: Locale): Int
The week of the year, calculated using the week definition associated with the provided locale.
If the week number is associated with the preceding year, 0 will be returned.
To obtain the week number of the week-based year, use weekOfWeekBasedYear instead.
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