DateRange

constructor(startDate: LocalDate, endDate: LocalDate)

Parameters

startDate

The first selected date.

endDate

The last selected date.


constructor(startYear: Int, startMonth: Int, startDay: Int, endYear: Int = startYear, endMonth: Int = startMonth, endDay: Int = startDay)

Creates a DateRange with explicit start and end date parts.

If a day is greater than the maximum day for its year/month, it is clamped to that maximum.

Parameters

startYear

The range start year. Must be in 1000..9999.

startMonth

The range start month. Must be in 1..12.

startDay

The range start day. Must be at least 1.

endYear

The range end year. Must be in 1000..9999.

endMonth

The range end month. Must be in 1..12.

endDay

The range end day. Must be at least 1.

Throws

if any date part is outside its supported range, or if the resulting start date is after the resulting end date.