Time::Format::RFC_2822 - Crystal 1.11.2

# module Time::Format::RFC_2822

##
Overview

The RFC 2822 datetime format.

This is also compatible to RFC 882 and RFC 1123.

    Time::Format::RFC_2822.format(Time.utc(2016, 2, 15, 4, 35, 50)) # => "Mon, 15 Feb 2016 04:35:50 +0000"

    Time::Format::RFC_2822.parse("Mon, 15 Feb 2016 04:35:50 +0000") # => 2016-02-15 04:35:50.0 +00:00
    Time::Format::RFC_2822.parse("Mon, 15 Feb 2016 04:35:50 UTC")   # => 2016-02-15 04:35:50.0 UTC

##
Defined in:

time/format/custom/rfc_2822.cr

##
Class Method Summary

- .format(time : Time, io : IO)

  Formats a `Time` into the given io.

- .format(time : Time) : String

  Formats a `Time` into a `String`.

- .parse(string, kind = Time::Location::UTC) : Time

  Parses a string into a `Time`.

##
Class Method Detail

def self.format(time : Time, io : IO) #

Formats a `Time` into the given io.

def self.format(time : Time) : String #

Formats a `Time` into a `String`.

def self.parse(string, kind = Time::Location::UTC) : Time #

Parses a string into a `Time`.