to method

Returns CustomTimeRange from this to other

If this is after other, it will be swapped.

Implementation

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

  return CustomTimeRange(other, this);
}