operator > method

bool operator >(
  1. DateTime other
)

Returns true if this occurs strictly after other, accounting for time zones.

Alias for DateTime.isAfter.

Note that attempting to use this operator with DateTime.== will likely give undesirable results. This operator compares moments (i.e. with time zone taken into account), while DateTime.== compares field values (i.e. two DateTimes representing the same moment in different time zones will be treated as not equal). To check moment equality with time zone taken into account, use DateTime.isAtSameMomentAs rather than DateTime.==.

Implementation

bool operator >(DateTime other) => isAfter(other);