class AWS::Core::XML::Frame
def datetime_like_value klass, parts_constructor
def datetime_like_value klass, parts_constructor # it's way faster to parse this specific format manually # vs. DateTime#parse, and this happens to be the format # that AWS uses almost (??) everywhere. if @text.tr(*TRANSLATE_DIGITS) == EASY_FORMAT parts = @text.tr(*DATE_PUNCTUATION).chop.split.map {|p| p.to_i } klass.send(parts_constructor, *parts) else # fallback in case we have to handle another date format klass.parse(@text) end end