{
"$comment": "Generated by scripts/generate-date-parse-corpus.ts — V8 is the authority for what Date.parse returns, and the crate reimplements it. Do not hand-edit; regenerate.",
"timezone": "America/New_York",
"cases": [
{
"input": "2024-01-15T10:30:45Z",
"why": "iso, zulu",
"timestamp": 1705314645000
},
{
"input": "2024-01-15T10:30:45.123Z",
"why": "iso, millis",
"timestamp": 1705314645123
},
{
"input": "2024-01-15T10:30:45",
"why": "iso, no zone — local",
"timestamp": 1705332645000
},
{
"input": "2024-01-15T10:30:45.123",
"why": "iso, millis, no zone",
"timestamp": 1705332645123
},
{
"input": "2024-01-15T10:30:45+05:30",
"why": "iso, positive offset",
"timestamp": 1705294845000
},
{
"input": "2024-01-15T10:30:45-08:00",
"why": "iso, negative offset",
"timestamp": 1705343445000
},
{
"input": "2024-01-15T10:30:45+00:00",
"why": "iso, zero offset",
"timestamp": 1705314645000
},
{
"input": "2024-01-15T00:00:00Z",
"why": "iso, midnight",
"timestamp": 1705276800000
},
{
"input": "2024-01-15T24:00:00Z",
"why": "hour 24 is the next midnight",
"timestamp": 1705363200000
},
{
"input": "2024-01-15T10:60:00Z",
"why": "minute 60 is a refusal",
"timestamp": null
},
{
"input": "2024-01-15T10:30:60Z",
"why": "second 60 is a refusal",
"timestamp": null
},
{
"input": "2024-02-30T00:00:00Z",
"why": "day 30 of February rolls over",
"timestamp": 1709251200000
},
{
"input": "2023-02-29T00:00:00Z",
"why": "a leap day in a common year rolls over",
"timestamp": 1677628800000
},
{
"input": "2024-13-01T00:00:00Z",
"why": "month 13 is a refusal",
"timestamp": null
},
{
"input": "2024-00-01T00:00:00Z",
"why": "month 0 is a refusal",
"timestamp": null
},
{
"input": "2024-01-32T00:00:00Z",
"why": "day 32 is a refusal",
"timestamp": null
},
{
"input": "2024-01-00T00:00:00Z",
"why": "day 0 is a refusal",
"timestamp": null
},
{
"input": "2024-01-15T10:30:45+24:00",
"why": "a 24-hour offset is a refusal",
"timestamp": null
},
{
"input": "1970-01-01T00:00:00Z",
"why": "the epoch",
"timestamp": 0
},
{
"input": "1969-12-31T23:59:59Z",
"why": "before the epoch",
"timestamp": -1000
},
{
"input": "2024-01-15T10:30:45.1Z",
"why": "one fractional digit",
"timestamp": 1705314645100
},
{
"input": "2024-01-15T10:30:45.123456Z",
"why": "fraction past millis truncates",
"timestamp": 1705314645123
},
{
"input": "2024-01-15",
"why": "simple, and UTC where the datetime form is local",
"timestamp": 1705276800000
},
{
"input": "2024-02-29",
"why": "a real leap day",
"timestamp": 1709164800000
},
{
"input": "2023-02-29",
"why": "a fake leap day rolls over",
"timestamp": 1677628800000
},
{
"input": "2024-12-31",
"why": "year end",
"timestamp": 1735603200000
},
{
"input": "2024-00-10",
"why": "month 0 is a refusal",
"timestamp": null
},
{
"input": "2024-01-00",
"why": "day 0 is a refusal",
"timestamp": null
},
{
"input": "Mon, 15 Jan 2024 10:30:45 GMT",
"why": "rfc2822",
"timestamp": 1705314645000
},
{
"input": "Mon, 15 Jan 2024 10:30:45 UTC",
"why": "utc names the same offset",
"timestamp": 1705314645000
},
{
"input": "Fri, 15 Jan 2024 10:30:45 GMT",
"why": "the weekday is wrong and ignored",
"timestamp": 1705314645000
},
{
"input": "Xyz, 15 Jan 2024 10:30:45 GMT",
"why": "the weekday is not a word and is ignored",
"timestamp": 1705314645000
},
{
"input": "Mon, 15 Xxx 2024 10:30:45 GMT",
"why": "the month is not a word — a refusal",
"timestamp": null
},
{
"input": "Mon, 1 Jan 2024 00:00:00 GMT",
"why": "a one-digit day",
"timestamp": 1704067200000
},
{
"input": "Mon, 15 Jan 2024 10:30:45 EST",
"why": "EST is always -5, never zone-aware",
"timestamp": 1705332645000
},
{
"input": "Mon, 15 Jan 2024 10:30:45 EDT",
"why": "EDT is always -4",
"timestamp": 1705329045000
},
{
"input": "Mon, 15 Jan 2024 10:30:45 CST",
"why": "CST is always -6",
"timestamp": 1705336245000
},
{
"input": "Mon, 15 Jan 2024 10:30:45 CDT",
"why": "CDT is always -5",
"timestamp": 1705332645000
},
{
"input": "Mon, 15 Jan 2024 10:30:45 MST",
"why": "MST is always -7",
"timestamp": 1705339845000
},
{
"input": "Mon, 15 Jan 2024 10:30:45 MDT",
"why": "MDT is always -6",
"timestamp": 1705336245000
},
{
"input": "Mon, 15 Jan 2024 10:30:45 PST",
"why": "PST is always -8",
"timestamp": 1705343445000
},
{
"input": "Mon, 15 Jan 2024 10:30:45 PDT",
"why": "PDT is always -7",
"timestamp": 1705339845000
},
{
"input": "Mon, 15 Jan 2024 10:30:45 CEST",
"why": "CEST is not a word — a refusal",
"timestamp": null
},
{
"input": "Mon, 15 Jan 2024 10:30:45 JST",
"why": "JST is not a word — a refusal",
"timestamp": null
},
{
"input": "Mon, 15 Jan 2024 10:30:45 AEST",
"why": "AEST is not a word — a refusal",
"timestamp": null
},
{
"input": "Mon, 15 Jan 2024 10:30:45 XYZ",
"why": "nonsense is a refusal",
"timestamp": null
},
{
"input": "Mon Jan 15 2024 10:30:45 GMT+0000",
"why": "utc form",
"timestamp": 1705314645000
},
{
"input": "Mon Jan 15 2024 10:30:45 GMT-0800",
"why": "utc form, negative",
"timestamp": 1705343445000
},
{
"input": "Xyz Jan 15 2024 10:30:45 GMT+0530",
"why": "the weekday is ignored here too",
"timestamp": 1705294845000
},
{
"input": "Mon Jan 15 2024 10:30:45 GMT+0000 (Coordinated Universal Time)",
"why": "the trailing comment is skipped",
"timestamp": 1705314645000
},
{
"input": "1/15/2024 10:30:45",
"why": "local, US ordering",
"timestamp": 1705332645000
},
{
"input": "12/31/2024 23:59:59",
"why": "local, year end",
"timestamp": 1735707599000
},
{
"input": "15/1/2024 10:30:45",
"why": "D/M ordering is a refusal, not a reinterpretation",
"timestamp": null
},
{
"input": "13/1/2024 10:30:45",
"why": "month 13 is a refusal",
"timestamp": null
},
{
"input": "2/30/2024 1:2:3",
"why": "February 30 rolls over here too",
"timestamp": 1709272923000
},
{
"input": "1/15/2024 25:30:45",
"why": "hour 25 is a refusal",
"timestamp": null
},
{
"input": "2024-01-15 10:30:45",
"why": "a space where the T goes",
"timestamp": 1705332645000
},
{
"input": "2024-01-15 10:30:45.123",
"why": "with millis",
"timestamp": 1705332645123
},
{
"input": "Jan 15 10:30:45 2026",
"why": "syslog, year appended",
"timestamp": 1768491045000
},
{
"input": "Feb 5 09:01:02 2026",
"why": "syslog pads the day with a second space",
"timestamp": 1770300062000
},
{
"input": "Dec 31 23:59:59 2026",
"why": "syslog, year end",
"timestamp": 1798779599000
},
{
"input": "Xxx 15 10:30:45 2026",
"why": "not a month — a refusal",
"timestamp": null
},
{
"input": "15 Jan 2024 10:30:08 +0000",
"why": "apache, normalised",
"timestamp": 1705314608000
},
{
"input": "15 Jan 2024 10:30:08 -0500",
"why": "apache, negative offset",
"timestamp": 1705332608000
},
{
"input": "15 Jan 2024 10:30:08 +0530",
"why": "apache, half-hour offset",
"timestamp": 1705294808000
},
{
"input": "March 5, 2024",
"why": "the month written out",
"timestamp": 1709614800000
},
{
"input": "March 5 2024",
"why": "no comma",
"timestamp": 1709614800000
},
{
"input": "5 March 2024",
"why": "day first",
"timestamp": 1709614800000
},
{
"input": "2024 March 5",
"why": "year first",
"timestamp": 1709614800000
},
{
"input": "Mar 5, 2024",
"why": "abbreviated",
"timestamp": 1709614800000
},
{
"input": "Janu 15 2024",
"why": "four letters — matched on the first three",
"timestamp": 1705294800000
},
{
"input": "Januar 15 2024",
"why": "six letters",
"timestamp": 1705294800000
},
{
"input": "January 15 2024",
"why": "all of it",
"timestamp": 1705294800000
},
{
"input": "Janxxx 15 2024",
"why": "three right letters and nonsense after",
"timestamp": 1705294800000
},
{
"input": "Ja 15 2024",
"why": "two letters is not enough — a refusal",
"timestamp": null
},
{
"input": "JANUARY 15 2024",
"why": "case does not matter",
"timestamp": 1705294800000
},
{
"input": "january 15 2024",
"why": "nor here",
"timestamp": 1705294800000
},
{
"input": "Foo Jan 15 2024",
"why": "a garbage word before the first number is skipped",
"timestamp": 1705294800000
},
{
"input": "Foo Bar Jan 15 2024",
"why": "two of them",
"timestamp": 1705294800000
},
{
"input": "Jan 15 2024 Foo",
"why": "a garbage word after a number is fatal",
"timestamp": null
},
{
"input": "Jan 15 2024 (a comment)",
"why": "parenthesised text is a comment",
"timestamp": 1705294800000
},
{
"input": "Jan 15 2024 (unclosed",
"why": "an unclosed comment is still a comment",
"timestamp": 1705294800000
},
{
"input": "Jan 32 2024",
"why": "day 32 is a refusal",
"timestamp": null
},
{
"input": "Jan 0 2024",
"why": "day 0 is a refusal",
"timestamp": null
},
{
"input": "1 2 2024",
"why": "three bare numbers, US ordering",
"timestamp": 1704171600000
},
{
"input": "2024 1 2",
"why": "year first when it cannot be a month",
"timestamp": 1704171600000
},
{
"input": "1-2-2024",
"why": "dashes",
"timestamp": 1704171600000
},
{
"input": "2024-1-2",
"why": "unpadded — not the ISO grammar, so the legacy parser takes it",
"timestamp": 1704171600000
},
{
"input": "2024/01/15",
"why": "slashes, year first",
"timestamp": 1705294800000
},
{
"input": "01/15/2024",
"why": "slashes, US ordering",
"timestamp": 1705294800000
},
{
"input": "2024.01.15",
"why": "dots",
"timestamp": 1705294800000
},
{
"input": "15.01.2024",
"why": "dots, day first — a refusal",
"timestamp": null
},
{
"input": "Jan 15 2024 10:30",
"why": "hours and minutes only",
"timestamp": 1705332600000
},
{
"input": "Jan 15 2024 10:30:45.5",
"why": "a fractional second",
"timestamp": 1705332645500
},
{
"input": "Jan 15 2024 1:30 PM",
"why": "pm shifts by twelve",
"timestamp": 1705343400000
},
{
"input": "Jan 15 2024 1:30 pm",
"why": "lowercase",
"timestamp": 1705343400000
},
{
"input": "Jan 15 2024 12:30 AM",
"why": "twelve am is midnight",
"timestamp": 1705296600000
},
{
"input": "Jan 15 2024 12:30 PM",
"why": "twelve pm is noon",
"timestamp": 1705339800000
},
{
"input": "Jan 15 2024 13:30 PM",
"why": "pm past twelve is a refusal",
"timestamp": null
},
{
"input": "Jan 15 2024 10:30:45 UT",
"why": "UT is an offset of zero",
"timestamp": 1705314645000
},
{
"input": "Jan 15 2024 10:30:45 Z",
"why": "so is Z",
"timestamp": 1705314645000
},
{
"input": "Jan 15 2024 10:30:45 +05:30",
"why": "a bare offset with a colon",
"timestamp": 1705294845000
},
{
"input": "Jan 15 2024 10:30:45 +0530",
"why": "and without",
"timestamp": 1705294845000
},
{
"input": "Jan 15 2024 10:30:45 +05",
"why": "hours only",
"timestamp": 1705296645000
},
{
"input": "Jan 15 2024 10:30:45 GMT+5",
"why": "a single-digit offset",
"timestamp": 1705296645000
},
{
"input": "Jan 15 2024 10:30:45 GMT+05:30",
"why": "GMT with a colon offset",
"timestamp": 1705294845000
},
{
"input": "1/15/99 10:30:45",
"why": "a two-digit year, 50 and up, is 1900s",
"timestamp": 916414245000
},
{
"input": "1/15/50 10:30:45",
"why": "the boundary, below",
"timestamp": -629886555000
},
{
"input": "1/15/49 10:30:45",
"why": "the boundary, above",
"timestamp": 2494337445000
},
{
"input": "1/15/24 10:30:45",
"why": "under 50 is 2000s",
"timestamp": 1705332645000
},
{
"input": "1/15/00 10:30:45",
"why": "and zero",
"timestamp": 947950245000
},
{
"input": "Tue Mar 05 2024",
"why": "a date with no time at all",
"timestamp": 1709614800000
},
{
"input": "Mon, 15 Jan 2024",
"why": "rfc2822 without the time",
"timestamp": 1705294800000
},
{
"input": "2024",
"why": "a bare year is the ISO grammar, so UTC",
"timestamp": 1704067200000
},
{
"input": "2024-01",
"why": "a year and month, also UTC",
"timestamp": 1704067200000
},
{
"input": "January 2024",
"why": "the same month by name is legacy, so local",
"timestamp": 1704085200000
},
{
"input": "2024-001",
"why": "not an ordinal date — read as a year and a number",
"timestamp": 1704085200000
},
{
"input": "not a date",
"why": "a refusal",
"timestamp": null
},
{
"input": "",
"why": "the empty string is a refusal",
"timestamp": null
},
{
"input": "now",
"why": "not a thing V8 knows",
"timestamp": null
},
{
"input": "2024-W03",
"why": "week dates are not supported",
"timestamp": null
},
{
"input": "20240115",
"why": "basic-format ISO is not supported",
"timestamp": null
},
{
"input": "10:30:45",
"why": "a time with no date is a refusal",
"timestamp": null
},
{
"input": "T10:30:45",
"why": "nor with a T",
"timestamp": null
},
{
"input": "2024-01-15T10:30",
"why": "minutes without seconds",
"timestamp": 1705332600000
},
{
"input": "2024-01-15 10:30",
"why": "the same with a space",
"timestamp": 1705332600000
},
{
"input": "2024-01-15t10:30:45z",
"why": "lowercase t and z",
"timestamp": 1705314645000
},
{
"input": "0024-01-15",
"why": "a four-digit ISO year of 24 is the year 24",
"timestamp": -61408627200000
},
{
"input": "0099-12-31T00:00:00Z",
"why": "and 99 is the year 99",
"timestamp": -59011545600000
},
{
"input": "0024-1-15",
"why": "the same year unpadded is legacy, and becomes 2024",
"timestamp": null
},
{
"input": "2024-01-15T10:30:45 GMT",
"why": "an ISO prefix and a legacy zone",
"timestamp": null
},
{
"input": "2024-01-15T10:30:45Z extra",
"why": "trailing garbage after a complete ISO string",
"timestamp": null
},
{
"input": "2024-01-15T10:30:45+05:30 (India)",
"why": "a comment after a complete one",
"timestamp": null
},
{
"input": "2024-03-10 01:59:59",
"why": "the last second before the gap",
"timestamp": 1710053999000
},
{
"input": "2024-03-10 02:30:00",
"why": "inside the gap — an hour that does not exist",
"timestamp": 1710055800000
},
{
"input": "2024-03-10 03:00:00",
"why": "the first second after the gap",
"timestamp": 1710054000000
},
{
"input": "2024-11-03 00:30:00",
"why": "before the fold",
"timestamp": 1730608200000
},
{
"input": "2024-11-03 01:30:00",
"why": "inside the fold — an hour that happens twice",
"timestamp": 1730611800000
},
{
"input": "2024-11-03 02:30:00",
"why": "after the fold",
"timestamp": 1730619000000
},
{
"input": "2024-03-10T02:30:00Z",
"why": "the same instant with a zone is unaffected",
"timestamp": 1710037800000
}
]
}