core / io.islandtime / fromWeekDate

fromWeekDate

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) fun Date.Companion.fromWeekDate(year: Int, week: Int, day: Int): Date

Create a Date from an ISO week date.

Parameters

year - the week-based year

week - the week number of the week-based year

day - the ISO day of week number, 1 (Monday) to 7 (Sunday)

Exceptions

DateTimeException - if the year, week, or day is invalid

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) fun Date.Companion.fromWeekDate(year: Int, week: Int, day: Int, settings: WeekSettings): Date

Create a Date from a week date representation using the week definition in settings.

Parameters

year - the week-based year

week - the week number of the week-based year

day - the day of week number, 1-7

settings - the week definition to use when interpreting the year, week, and day

(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) fun Date.Companion.fromWeekDate(year: Int, week: Int, day: Int, locale: <ERROR CLASS>): Date

Create a Date from a week date representation using the week definition associated with the provided locale.

Parameters

year - the week-based year

week - the week number of the week-based year

day - the day of week number, 1-7

locale - the locale providing the week definition to use when interpreting the year, week, and day

(jvm) fun Date.Companion.fromWeekDate(year: Int, week: Int, day: Int, locale: Locale): Date

Create a Date from a week date representation using the week definition associated with the provided locale.

Parameters

year - the week-based year

week - the week number of the week-based year

day - the day of week number, 1-7

locale - the locale providing the week definition to use when interpreting the year, week, and day