Skip to content
class method

Date._rfc3339

(::String str) -> ::Hash[::Symbol, ::Integer | ::String]
Date._rfc3339(string, limit: 128) → hash

Returns a hash of values parsed from string, which should be a valid RFC 3339 format:

Example
d = Date.new(2001, 2, 3)
s = d.rfc3339     # => "2001-02-03T00:00:00+00:00"
Date._rfc3339(s)
# => {:year=>2001, :mon=>2, :mday=>3, :hour=>0, :min=>0, :sec=>0, :zone=>"+00:00", :offset=>0}

See argument limit.

Related: Date.rfc3339 (returns a Date object).

See also .rfc2822 .rfc3339 ._rfc2822 ._rfc822 also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0