def atomize(input)
      duration = parse(input) || raise(ISO8601::Errors::UnknownPattern, input)

      valid_pattern?(duration)

      @sign = sign_to_i(duration[:sign])

      components = parse_tokens(duration)
      components.delete(:time) # clean time capture

      valid_fractions?(components.values)

      components
    end
def atomize(input)
      duration = parse(input) || raise(ISO8601::Errors::UnknownPattern, input)

      valid_pattern?(duration)

      @sign = sign_to_i(duration[:sign])

      components = parse_tokens(duration)
      components.delete(:time) # clean time capture

      valid_fractions?(components.values)

      components
    end
Splits a duration pattern into valid atoms.

 Acceptable patterns:

 * PnYnMnD
 * PTnHnMnS
 * PnYnMnDTnHnMnS
 * PnW

 Where `n` is any number. If it contains a decimal fraction, a dot (`.`) or
 comma (`,`) can be used.

 @param [String] input

 @return [Hash<Float>]