Skip to main content
The constraints of java.time values, and of java.util.Date. past, future and their OrPresent forms read the clock of the configuration. The comparisons take a value of the same type.
A null argument checks nothing. A rule that reads a value that may be missing, such as max(customer.limit), never fails because of it: required on that value reports it once.
Event.kt

Relative to now

past

past() on LocalDate, LocalDateTime, ZonedDateTime, OffsetDateTime, Instant, YearMonth, Year, Date Checks that the date is before now. past

future

future() on LocalDate, LocalDateTime, ZonedDateTime, OffsetDateTime, Instant, YearMonth, Year, Date Checks that the date is after now. future

pastOrPresent

pastOrPresent() on LocalDate, LocalDateTime, ZonedDateTime, OffsetDateTime, Instant, YearMonth, Year, Date Checks that the date is now or before. pastOrPresent

futureOrPresent

futureOrPresent() on LocalDate, LocalDateTime, ZonedDateTime, OffsetDateTime, Instant, YearMonth, Year, Date Checks that the date is now or after. futureOrPresent

Comparisons

after

after(other) on LocalDate, LocalDateTime, LocalTime, OffsetTime, ZonedDateTime, OffsetDateTime, Instant, YearMonth, Year, Date Checks that the date is after other. after

before

before(other) on LocalDate, LocalDateTime, LocalTime, OffsetTime, ZonedDateTime, OffsetDateTime, Instant, YearMonth, Year, Date Checks that the date is before other. before

afterOrEqual

afterOrEqual(other) on LocalDate, LocalDateTime, LocalTime, OffsetTime, ZonedDateTime, OffsetDateTime, Instant, YearMonth, Year, Date Checks that the date is other or after. afterOrEqual

beforeOrEqual

beforeOrEqual(other) on LocalDate, LocalDateTime, LocalTime, OffsetTime, ZonedDateTime, OffsetDateTime, Instant, YearMonth, Year, Date Checks that the date is other or before. beforeOrEqual

between

between(start, end) on LocalDate, LocalDateTime, LocalTime, OffsetTime, ZonedDateTime, OffsetDateTime, Instant, YearMonth, Year, Date Checks that the date is between start and end, both included. between
between on dates and times is inclusive and uses the message betweenDates. Lengths of time, both kotlin.time.Duration and java.time.Duration, have their rules on Durations.