Skip to content
instance method

Date#rfc822

() -> ::String
rfc822

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).

See also #rfc2822 .rfc822 #rfc3339 #saturday? also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0