core / io.islandtime / weekOfMonth

weekOfMonth

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

The week of the month, from 0-6, calculated using the ISO week definition.

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

The week of the month, from 0-6, calculated using the week definition in settings.

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

The week of the month, from 0-6, calculated using the default week definition 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.

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

The week of the month, from 0-6, calculated using the default week definition 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.