instance method
Date#rfc822
() -> ::String
rfc822
ext/date/date_core.c
View on GitHub ↗
static VALUE
d_lite_rfc2822(VALUE self)
{
return strftimev("%a, %-d %b %Y %T %z", self, set_tmx);
}
Alias of #rfc2822
Returns a new Date object with values parsed from string, which should be a valid RFC 2822 date format:
Example
d = Date.new(2001, 2, 3) s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000" Date.rfc2822(s) # => #<Date: 2001-02-03>
See:
Related: Date._rfc2822 (returns a hash).