setWeekOfYearMonday

fun LocalDate.setWeekOfYearMonday(week: Int, locale: Locale = Locale.GERMANY): LocalDate

Returns this LocalDate with week of the year set to week and day of the week set to DayOfWeek.MONDAY. I.e. when this date is 23-08-2019 and week is 2, the returned date is 07-01-2019.

For such operation, Locale of country (therefore one must use Locale.GERMANY instead of Locale.GERMAN) is required. The default value is set to Locale.GERMANY since it uses calendar which starts at Monday.

Sources

Katlib source
Link copied to clipboard