compare method

Ordering<Duration> compare(
  1. DateTime other
)

Implementation

Ordering<Duration> compare(DateTime other) {
  final difference = this.difference(other);

  if (difference > Duration.zero) {
    return Greater(difference);
  } else if (difference < Duration.zero) {
    return Less(-difference);
  } else {
    return const Equal();
  }
}