Skip to content

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

class method

Date._jisx0301

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

Returns a hash of values parsed from string, which should be a valid JIS X 0301 date format:

Example
d = Date.new(2001, 2, 3)
s = d.jisx0301    # => "H13.02.03"
Date._jisx0301(s) # => {:year=>2001, :mon=>2, :mday=>3}

See argument limit.

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

See also .jd .jisx0301 .iso8601 .json_create also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0