Date and Time Formatting - WaxCylinderRevival/frus-dates-project GitHub Wiki
ISO 8601
ISO 8601 is the international standard for representing dates and times numerically for machine-readability. This standard can be used by anyone who wants to reduce uncertainty and confusion, especially when communicating or exchanging data internationally.
Expressing Date
yyyy-mm-dd
[4-digit year] - [2-digit month] - [2-digit day]
Examples:
- December 31, 1882: 1882-12-31
- June 6, 1951: 1951-06-06
- March 4, 2001: 2001-03-04
Expressing Date and Time
yyyy-mm-ddThh:mm:ss
[4-digit year] - [2-digit month] - [2-digit day] T [2-digit hours] : [2-digit minutes] : [2-digit seconds]
Examples:
- 9pm on December 31, 1882: 1882-12-31T21:00:00
- 11:36 am on June 6, 1951: 1951-06-06T11:30:00
- Noon on March 4, 2001: 2001-03-04T12:00:00
Expressing Midnight
yyyy-mm-ddT00:00:00
[4-digit year] - [2-digit month] - [2-digit day] T 00:00:00
Examples:
- Midnight on December 31, 1882: 1883-01-01T00:00:00
- Midnight on June 6, 1951: 1951-06-07T00:00:00
- Midnight on March 4, 2001: 2001-03-05T00:00:00
Expressing Date and Time with UTC Offset
yyyy-mm-ddThh:mm:ss+hh:ss
[4-digit year] - [2-digit month] - [2-digit day] T [2-digit hours] : [2-digit minutes] : [2-digit seconds] [+/-] [2-digit hours offset] : [2-digit minutes offset]
Examples:
- 9pm on December 31, 1882 in Washington, DC: 1882-12-31T21:00:00-04:56
- 11:36 am on June 6, 1951 in Paris: 1951-06-06T11:30:00+01:00
- Noon on March 4, 2001 in Shanghai: 2001-03-04T12:00:00+08:00
Resource: https://www.timeanddate.com
Expressing Zulu Time
yyyy-mm-ddThh:mm:ss+00:00
[4-digit year] - [2-digit month] - [2-digit day] T [2-digit hours] : [2-digit minutes] : [2-digit seconds] +00:00
Examples:
- 11:36 am on June 6, 1951 in Paris (Zulu time): 1951-06-06T11:30:00+00:00
- Noon on March 4, 2001 in Shanghai (Zulu time): 2001-03-04T12:00:00+00:00