Skip to content

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

class method

Date._iso8601

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

Returns a hash of values parsed from string, which should contain an ISO 8601 formatted date:

Example
d = Date.new(2001, 2, 3)
s = d.iso8601    # => "2001-02-03"
Date._iso8601(s) # => {:mday=>3, :year=>2001, :mon=>2}

See argument limit.

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

See also .httpdate .iso8601 ._httpdate .jd also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0