End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Date._rfc822
Date._rfc2822(string, limit: 128) → hash
Date._rfc822(string, limit: 128) → hash
ext/date/date_core.c
View on GitHub ↗
static VALUE
date_s__rfc2822(int argc, VALUE *argv, VALUE klass)
{
VALUE str, opt;
rb_scan_args(argc, argv, "1:", &str, &opt);
check_limit(str, opt);
return date__rfc2822(str);
}
Returns a hash of parsed elements.
Raise an ArgumentError when the string length is longer than limit. You can stop this check by passing ‘limit: nil`, but note that it may take a long time to parse.