isBefore method

bool isBefore(
  1. ZonedDateTime other
)

Checks if this date-time is before another.

Example:

final earlier = ZonedDateTime.now();
final later = earlier.plusHours(1);

print(earlier.isBefore(later)); // true
print(later.isBefore(earlier)); // false

Implementation

bool isBefore(ZonedDateTime other) => compareTo(other) < 0;