Which date formats are IETF-compliant RFC 2822 timestamps?

MSDN has several examples of valid date formats:

document.writeln((new Date("2010")).toUTCString()); 

document.writeln((new Date("2010-06")).toUTCString());

document.writeln((new Date("2010-06-09")).toUTCString());

 // Specifies Z, which indicates UTC time.
document.writeln((new Date("2010-06-09T15:20:00Z")).toUTCString());

 // Specifies -07:00 offset, which is equivalent to Pacific Daylight time.
document.writeln((new Date("2010-06-09T15:20:00-07:00")).toGMTString());

// Specifies a non-ISO Long date.
document.writeln((new Date("June 9, 2010")).toUTCString());

// Specifies a non-ISO Long date.
document.writeln((new Date("2010 June 9")).toUTCString());

// Specifies a non-ISO Short date and time.
document.writeln((new Date("6/9/2010 3:20 pm")).toUTCString());

// Output:
// Fri, 1 Jan 2010 00:00:00 UTC
// Tue, 1 Jun 2010 00:00:00 UTC
// Wed, 9 Jun 2010 00:00:00 UTC
// Wed, 9 Jun 2010 15:20:00 UTC
// Wed, 9 Jun 2010 22:20:00 UTC
// Wed, 9 Jun 2010 07:00:00 UTC
// Wed, 9 Jun 2010 07:00:00 UTC
// Wed, 9 Jun 2010 22:20:00 UTC

Gotchas

There's a matrix of cross-browser inconsistencies as well.

References

  • Same Markup: Writing Cross-Browser Code – IEBlog

  • Loading Javascript files in parallel – Kristoffer's tidbits


This question seems to be asking "What formats are required to be parsed by ECMAScript implementations".

Prior to ECMAScript Ed 5 (2011), parsing was entirely implementation dependent. The formats that ECMAScript implementations are required to parse can be summarised as:

  1. A single (though slightly modified) version of ISO 8601 extended format called the "date time string format" introduced in ECMAScript ed 5 (2011). It differs from ISO 8601 in that date-only forms are treated as UTC, not local and the timezone offset must have a colon between the hours and minutes.
  2. The format produced by an implementation's own toString method, which was standardised in ECMAScript 2018
  3. The format produced by an implementation's own toUTCString method, also standardised in ECMAScript 2018

Parsing of any other format remains implementation dependent and there are differences, so the general rule is "don't use the built-in parser".