Timex.DateFormat.Formats
This module defines all known (by timex) common date/time formats, in macro form.
Each format is returned as the following structure:
[tokenizer:
These formats are consumed by the datetime string parsers, by first tokenizing the chosen format, then parsing the datetime string using those tokens.
Summary↑
ansic() | ANSI C standard date/time format.
Example: |
iso_8601() | ISO 8601 date/time format with timezone information.
Example: |
iso_8601z() | ISO 8601 date/time format, assumes UTC/Zulu timezone.
Example: |
iso_date() | ISO-standardized year/month/day format.
Example: |
iso_ordinal() | ISO year, followed by ISO ordinal day
Example: |
iso_time() | ISO-standardized hour/minute/second format.
Example: |
iso_week() | ISO year, followed by ISO week number
Example: |
iso_weekday() | ISO year, followed by ISO week number, and ISO week day number
Example: |
kitchen() | Kitchen clock time format.
Example: |
rfc_1123() | RFC 1123 date/time format with timezone information.
Example: |
rfc_1123z() | RFC 1123 date/time format, assumes UTC/Zulu timezone.
Example: |
rfc_3339() | RFC 3339 date/time format with timezone information.
Example: |
rfc_3339z() | RFC 3339 date/time format, assumes UTC/Zulu timezone.
Example: |
rfc_822() | RFC 822 date/time format with timezone information.
Examples: |
rfc_822z() | Same as |
slashed_date() | Month, day, and year, in slashed style.
Example: |
strftime_clock() | Wall clock in strftime format.
Example: |
strftime_iso_date() | ISO date, in strftime format.
Example: |
strftime_kitchen() | Kitchen clock in strftime format.
Example: |
strftime_shortdate() | Friendly short date format. Uses spaces for padding on the day.
Example: |
unix() | UNIX standard date/time format.
Example: |
Macros
ANSI C standard date/time format.
Example: Tue Mar 5 23:25:19 2013
ISO 8601 date/time format with timezone information.
Example: 2007-08-13T16:48:01 +0300
ISO 8601 date/time format, assumes UTC/Zulu timezone.
Example: 2007-08-13T13:48:01Z
ISO-standardized year/month/day format.
Example: 2013-02-29
ISO year, followed by ISO ordinal day
Example: 2007-113
ISO-standardized hour/minute/second format.
Example: 23:05:45
ISO year, followed by ISO week number
Example: 2007-W09
ISO year, followed by ISO week number, and ISO week day number
Example: 2007-W09-1
Kitchen clock time format.
Example: 3:25PM
RFC 1123 date/time format with timezone information.
Example: Tue, 05 Mar 2013 23:25:19 GMT
RFC 1123 date/time format, assumes UTC/Zulu timezone.
Example: Tue, 05 Mar 2013 23:25:19 +0200
RFC 3339 date/time format with timezone information.
Example: 2013-03-05T23:25:19+02:00
RFC 3339 date/time format, assumes UTC/Zulu timezone.
Example: 2013-03-05T23:25:19Z
RFC 822 date/time format with timezone information.
Examples: Mon, 05 Jun 14 23:20:59 Y
From the specification (RE: timezones):
Time zone may be indicated in several ways. “UT” is Univer- sal Time (formerly called “Greenwich Mean Time”); “GMT” is per- mitted as a reference to Universal Time. The military standard uses a single character for each zone. “Z” is Universal Time. “A” indicates one hour earlier, and “M” indicates 12 hours ear- lier; “N” is one hour later, and “Y” is 12 hours later. The letter “J” is not used. The other remaining two forms are taken from ANSI standard X3.51-1975. One allows explicit indication of the amount of offset from UT; the other uses common 3-character strings for indicating time zones in North America.
Same as rfc_822
, but locked to universal time.
Month, day, and year, in slashed style.
Example: 04/12/1987
Wall clock in strftime format.
Example: 23:30
ISO date, in strftime format.
Example: 1987-04-12
Kitchen clock in strftime format.
Example: 4:30:01 PM
Friendly short date format. Uses spaces for padding on the day.
Example: 5-Jan-2014
UNIX standard date/time format.
Example: Tue Mar 5 23:25:19 PST 2013