Date - Mail / Internet - Date format (rfc822, 850, 2822)

About

A date can be represented as a string with the date format defined in a email (ie rfc2822 format).

This format is the second most popular format below ISO 8601 format and is well spread.

For instance, this format is recognized by google (Ref) but they prefers the ISO 8601 format.

Example

Thu, 21 Dec 2000 16:01:07 +0200

Syntax

Space are recommended but not mandatory.

(* Day name *)
[[  "Mon" | "Tue" | "Wed" | "Thu" | "Fri" | "Sat" | "Sun" ] ","]
(* Day digit *)
'day (2 digit)'
(* Month Short Name *)
( "Jan" | "Feb" | "Mar" | "Apr" | "May" | "Jun" | "Jul" | "Aug" |  "Sep" | "Oct" | "Nov" | "Dec" )
(* Year *)
'year (4 digits)'
(* Time *)
'hour (2 digits)' ":" 'minute (2 digits)' [ ":" 'second (2 digit)' ]
(* Zone *)
( "+" | "-" ) 'zone (4 digit)'

Library

gmdate('r', $timestamp)

Documentation / Reference


Powered by ComboStrap