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
ext/date/date_core.c
View on GitHub ↗
static VALUE
date_s__jisx0301(int argc, VALUE *argv, VALUE klass)
{
VALUE str, opt;
rb_scan_args(argc, argv, "1:", &str, &opt);
check_limit(str, opt);
return date__jisx0301(str);
}
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).