rangeTo method

CustomTimeRange rangeTo(
  1. DateTime other
)

Returns CustomTimeRange from this to other

If this is after other, it will be swapped.

Implementation

CustomTimeRange rangeTo(DateTime other) {
  if (this < other) return CustomTimeRange(this, other);

  return CustomTimeRange(other, this);
}