Date functions
The functions for attributes with datatype Date require a long value as time stamp, in the UNIX Epoch time format 1234567890000, and a string value as calendar date, in the ISO extended format YYYY-MM-DD.
| Function | Description |
|---|---|
| now() | Checks whether the time stamp returns the current date. |
| isPast (Timestamp) | Checks whether the time stamp is in the past (before the system date). |
| isFuture (Timestamp) | Checks whether the time stamp is in the future (after the system date). |
| isEqual (Timestamp, Date) | Checks whether the time stamp is the same as the date. |
| isLess (Timestamp, Date) | Checks whether the time stamp is less than the date. |
| isLessEq (Timestamp, Date) | Checks whether the time stamp is less than or equal to the date. |
| isGreater (Timestamp, Date) | Checks whether the time stamp is greater than the date. |
| isGreaterEq (Timestamp, Date) | Checks whether the time stamp is greater than or equal to the date. |
| isBetween(Timestamp, Date1, Date2) | Checks whether the time stamp is greater than the first date but smaller than the second date. |
Compare with a relative date
The date functions compare a time stamp with a fixed date. To compare with a relative date, such as the same day next year, calculate the date in the validation script. Use the full class name, for example java.time.LocalDate.now().plusYears(1). The short name LocalDate isn't available in validation scripts and causes the validation to fail.