def parse_interval(str)
      match = range_match(str)
      return nil if match.nil?

      begin_date, end_date = match.map { |date| parse(date) || :unknown }

      begin_date = begin_date.first if begin_date.respond_to? :first
      end_date = end_date.last if end_date.respond_to? :last

      EDTF::Interval.new(begin_date, end_date)
    end
def parse_interval(str)
      match = range_match(str)
      return nil if match.nil?

      begin_date, end_date = match.map { |date| parse(date) || :unknown }

      begin_date = begin_date.first if begin_date.respond_to? :first
      end_date = end_date.last if end_date.respond_to? :last

      EDTF::Interval.new(begin_date, end_date)
    end
Creates an EDTF::Interval from a string

 @param str [String] a string which may contain a date range
 @return [ETDF::Interval, nil] an EDTF object representing a date range
   or nil if none can be found

 @see #range_match