isAfter
isAfter compares two date-times and returns true if the first parameter comes after the second parameter.
Syntax
isAfter(instant1, instant2)
isAfter(dateTime1, dateTime2)
Parameters
| Parameter | Type | Description |
|---|---|---|
| instant1 | Instant | The first date-time for the comparison. |
| instant2 | Instant | The second date-time for the comparison. |
| dateTime1 | ZonedDateTime | The first date-time for the comparison. |
| dateTime2 | dateTime2 | The second date-time for the comparison. |
Returns
Returns a boolean value:
trueif the first date-time comes after the second date-time.falseotherwise.
Example
The following example shows how to use isAfter to compare two Instants.
d1 = parseInstant("2022-01-01T00:00:00 ET")
d2 = parseInstant("2022-01-02T00:00:00 ET")
println isAfter(d1, d2)
println isAfter(d2, d1)