def atomize(input)
      week_date = parse_weekdate(input)
      return atomize_week_date(input, week_date[2], week_date[1]) unless week_date.nil?

      _, sign, year, separator, day = parse_ordinal(input)
      return atomize_ordinal(year, day, separator, sign) unless year.nil?

      _, year, separator, month, day = parse_date(input)

      raise(ISO8601::Errors::UnknownPattern, @original) if year.nil?

      @separator = separator

      [year, month, day].compact.map(&:to_i)
    end
def atomize(input)
      week_date = parse_weekdate(input)
      return atomize_week_date(input, week_date[2], week_date[1]) unless week_date.nil?

      _, sign, year, separator, day = parse_ordinal(input)
      return atomize_ordinal(year, day, separator, sign) unless year.nil?

      _, year, separator, month, day = parse_date(input)

      raise(ISO8601::Errors::UnknownPattern, @original) if year.nil?

      @separator = separator

      [year, month, day].compact.map(&:to_i)
    end
Splits the date component into valid atoms.

 Acceptable patterns:

 * YYYY
 * YYYY-MM but not YYYYMM
 * YYYY-MM-DD, YYYYMMDD
 * YYYY-Www, YYYYWdd
 * YYYY-Www-D, YYYYWddD
 * YYYY-DDD, YYYYDDD

 @param [String] input

 @return [Array<Integer>]
 rubocop:disable Metrics/AbcSize