Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

DateTime._strptime

DateTime._strptime(string[, format='%FT%T%z']) → hash

Parses the given representation of date and time with the given template, and returns a hash of parsed elements. _strptime does not support specification of flags and width unlike strftime.

See also strptime(3) and strftime.

See also .rfc822 .strptime .rfc3339 .xmlschema also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0