{
"$comment": "The extraction contract between the extension (src/extraction/) and the Rust CLI (crate/src/extract/). Both run this file. Regenerate deliberately, never to make a build pass.",
"timezone": "America/New_York",
"year": 2026,
"documents": [
{
"name": "every shape, plus the digit runs that only look like epochs",
"file": "events.json",
"fileType": "json",
"expected": [
{
"value": "2024-01-15T10:30:45Z",
"format": "iso",
"timestamp": 1705314645000,
"line": 2,
"column": 17
},
{
"value": "2024-01-15T10:30:45.123-08:00",
"format": "iso",
"timestamp": 1705343445123,
"line": 3,
"column": 17
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 4,
"column": 19
},
{
"value": "1705314645",
"format": "unix",
"timestamp": 1705314645000,
"line": 5,
"column": 19
},
{
"value": "1705314645123",
"format": "unix",
"timestamp": 1705314645123,
"line": 6,
"column": 18
},
{
"value": "5551234567",
"format": "unix",
"timestamp": 5551234567000,
"line": 8,
"column": 13
},
{
"value": "1705314645",
"format": "unix",
"timestamp": 1705314645000,
"line": 10,
"column": 19
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 11,
"column": 20
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 11,
"column": 41
}
]
},
{
"name": "the same date twice on a row, and one inside an ISO",
"file": "rows.csv",
"fileType": "csv",
"expected": [
{
"value": "2024-01-15T10:30:45Z",
"format": "iso",
"timestamp": 1705314645000,
"line": 2,
"column": 3
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 2,
"column": 24
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 3,
"column": 3
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 3,
"column": 14
},
{
"value": "2024-02-29",
"format": "simple",
"timestamp": 1709164800000,
"line": 4,
"column": 3
},
{
"value": "2023-02-29",
"format": "simple",
"timestamp": 1677628800000,
"line": 4,
"column": 14
},
{
"value": "1705314645",
"format": "unix",
"timestamp": 1705314645000,
"line": 5,
"column": 3
},
{
"value": "12/31/2024 23:59:59",
"format": "local",
"timestamp": 1735707599000,
"line": 6,
"column": 3
}
]
},
{
"name": "comments masked in place, so what follows keeps its column",
"file": "feed.xml",
"fileType": "xml",
"expected": [
{
"value": "2024-01-15T10:30:45Z",
"format": "iso",
"timestamp": 1705314645000,
"line": 5,
"column": 16
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 6,
"column": 47
},
{
"value": "2024-06-01T00:00:00Z",
"format": "iso",
"timestamp": 1717200000000,
"line": 14,
"column": 16
}
]
},
{
"name": "log timestamps, syslog and Apache",
"file": "app.log",
"fileType": "log",
"expected": [
{
"value": "2024-01-15 10:30:45.123",
"format": "iso",
"timestamp": 1705332645123,
"line": 1,
"column": 1
},
{
"value": "2024-01-15 10:30:46",
"format": "iso",
"timestamp": 1705332646000,
"line": 2,
"column": 1
},
{
"value": "Jan 15 10:30:47",
"format": "custom",
"timestamp": 1768491047000,
"line": 3,
"column": 1
},
{
"value": "15/Jan/2024:10:30:48 +0000",
"format": "custom",
"timestamp": 1705314648000,
"line": 4,
"column": 16
},
{
"value": "2024-01-15T10:30:49Z",
"format": "iso",
"timestamp": 1705314649000,
"line": 5,
"column": 1
},
{
"value": "1705314650",
"format": "unix",
"timestamp": 1705314650000,
"line": 6,
"column": 7
},
{
"value": "9876543210987",
"format": "unix",
"timestamp": 9876543210987,
"line": 6,
"column": 29
}
]
},
{
"name": "date-constructor arguments, including one split across lines",
"file": "dates.ts",
"fileType": "typescript",
"expected": [
{
"value": "March 5, 2024",
"format": "custom",
"timestamp": 1709614800000,
"line": 3,
"column": 27
},
{
"value": "2024-01-15T10:30:45Z",
"format": "iso",
"timestamp": 1705314645000,
"line": 4,
"column": 28
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 5,
"column": 27
},
{
"value": "1/15/2024 10:30:45",
"format": "local",
"timestamp": 1705332645000,
"line": 6,
"column": 25
},
{
"value": "2024-06-01T00:00:00Z",
"format": "iso",
"timestamp": 1717200000000,
"line": 7,
"column": 36
},
{
"value": "January 15 2024",
"format": "custom",
"timestamp": 1705294800000,
"line": 11,
"column": 3
},
{
"value": "2024-12-31T23:59:59Z",
"format": "iso",
"timestamp": 1735689599000,
"line": 18,
"column": 15
},
{
"value": "1705314645",
"format": "unix",
"timestamp": 1705314645000,
"line": 19,
"column": 17
}
]
},
{
"name": "datetime attributes, a date meta tag and JSON-LD",
"file": "page.html",
"fileType": "html",
"expected": [
{
"value": "2024-01-15T10:30:45Z",
"format": "iso",
"timestamp": 1705314645000,
"line": 2,
"column": 32
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 4,
"column": 19
},
{
"value": "2024-06-01T00:00:00Z",
"format": "iso",
"timestamp": 1717200000000,
"line": 6,
"column": 15
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 8,
"column": 16
},
{
"value": "12/31/2024 23:59:59",
"format": "local",
"timestamp": 1735707599000,
"line": 8,
"column": 39
},
{
"value": "2024-01-15T10:30:45Z",
"format": "iso",
"timestamp": 1705314645000,
"line": 11,
"column": 23
},
{
"value": "March 5, 2024",
"format": "custom",
"timestamp": 1709614800000,
"line": 11,
"column": 63
}
]
},
{
"name": "the named forms, and columns past non-ASCII characters",
"file": "schedule.yaml",
"fileType": "yaml",
"expected": [
{
"value": "2019-05-04",
"format": "simple",
"timestamp": 1556928000000,
"line": 1,
"column": 28
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 3,
"column": 10
},
{
"value": "2024-12-31T23:59:59+05:30",
"format": "iso",
"timestamp": 1735669799000,
"line": 4,
"column": 11
},
{
"value": "Mon, 15 Jan 2024 10:30:45 GMT",
"format": "rfc2822",
"timestamp": 1705314645000,
"line": 5,
"column": 14
},
{
"value": "Mon Jan 15 2024 10:30:45 GMT+0000",
"format": "utc",
"timestamp": 1705314645000,
"line": 6,
"column": 14
},
{
"value": "1705314645",
"format": "unix",
"timestamp": 1705314645000,
"line": 7,
"column": 11
},
{
"value": "2024-03-05",
"format": "simple",
"timestamp": 1709596800000,
"line": 10,
"column": 53
},
{
"value": "2024-04-01",
"format": "simple",
"timestamp": 1711929600000,
"line": 11,
"column": 9
}
]
}
]
}