coerceYearMonth

Returns the closest selectable YearMonth for yearMonth.

Throws

if yearItems or monthItems are empty, contain duplicates, or contain values outside their supported ranges.


fun coerceYearMonth(year: Int, month: Int): YearMonth

Returns the closest selectable YearMonth for year and month.

Throws

if year or month is outside the supported range, or if the configured item lists are invalid.