Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

CGI::Util#rfc1123_date

(::Time time) -> ::String
rfc1123_date(time)

Format a Time object as a String using the format specified by RFC 1123.

Example
CGI.rfc1123_date(Time.now)
  # Sat, 01 Jan 2000 00:00:00 GMT
See also #pretty #unescape #h #unescape_element also in 3.3 · 3.2 · 3.1 · 3.0