isBefore method

bool isBefore(
  1. EtDatetime other
)
override

Returns true if current instance occurs before the other.

var now = new EtDatetime.now();
var earlier = now.subtract(const Duration(seconds: 5));
assert(earlier.isBefore(now));
assert(!now.isBefore(now));

Implementation

bool isBefore(EtDatetime other) =>
    fixed < other.fixed && moment < other.moment;