def limits(atoms)
      valid_atoms?(atoms)

      return tuple_by_both(atoms) if atoms.none? { |x| x.is_a?(ISO8601::Duration) }
      return tuple_by_end(atoms) if atoms.first.is_a?(ISO8601::Duration)

      tuple_by_start(atoms)
    end
def limits(atoms)
      valid_atoms?(atoms)

      return tuple_by_both(atoms) if atoms.none? { |x| x.is_a?(ISO8601::Duration) }
      return tuple_by_end(atoms) if atoms.first.is_a?(ISO8601::Duration)

      tuple_by_start(atoms)
    end
Calculates the limits (first, last) and the size of the interval.

 @param [Array] atoms The atoms result of parsing the pattern.

 @return [Array<(ISO8601::DateTime, ISO8601::DateTime, ISO8601::Duration)>]