End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Date._iso8601
Date._iso8601(string, limit: 128) → hash
ext/date/date_core.c
View on GitHub ↗
static VALUE
date_s__iso8601(int argc, VALUE *argv, VALUE klass)
{
VALUE str, opt;
rb_scan_args(argc, argv, "1:", &str, &opt);
check_limit(str, opt);
return date__iso8601(str);
}
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).