{
"$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
}
]
},
{
"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": "JavaScript, where a constructor argument is the only thing that makes a string a date",
"file": "calendar.js",
"fileType": "javascript",
"expected": [
{
"value": "March 5, 2024",
"format": "custom",
"timestamp": 1709614800000,
"line": 5,
"column": 27
},
{
"value": "15 Jan 2024 10:30:08 +0000",
"format": "custom",
"timestamp": 1705314608000,
"line": 6,
"column": 24
},
{
"value": "2024-01-15T10:30:45Z",
"format": "iso",
"timestamp": 1705314645000,
"line": 7,
"column": 24
},
{
"value": "Mon, 15 Jan 2024 10:30:45 CEST",
"format": "rfc2822",
"timestamp": 1705307445000,
"line": 8,
"column": 28
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 9,
"column": 25
},
{
"value": "2024-02-29",
"format": "simple",
"timestamp": 1709164800000,
"line": 9,
"column": 43
},
{
"value": "January 15 2024",
"format": "custom",
"timestamp": 1705294800000,
"line": 13,
"column": 3
}
]
},
{
"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": "20240115",
"format": "basic",
"timestamp": 1705276800000,
"line": 8,
"column": 12
},
{
"value": "2024-03-05",
"format": "simple",
"timestamp": 1709596800000,
"line": 10,
"column": 53
},
{
"value": "2024-04-01",
"format": "simple",
"timestamp": 1711929600000,
"line": 11,
"column": 9
}
]
},
{
"name": "a Python file, read by the fallback — and a syslog line that is not a date in one",
"file": "settings.py",
"fileType": "unknown",
"expected": [
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 5,
"column": 17
},
{
"value": "2024-01-15T10:30:45Z",
"format": "iso",
"timestamp": 1705314645000,
"line": 6,
"column": 16
},
{
"value": "1705314645",
"format": "unix",
"timestamp": 1705314645000,
"line": 7,
"column": 17
}
]
},
{
"name": "a Go file, nanosecond epochs and a constructor argument that is only a string here",
"file": "handler.go",
"fileType": "unknown",
"expected": [
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 3,
"column": 13
},
{
"value": "2024-06-01T00:00:00Z",
"format": "iso",
"timestamp": 1717200000000,
"line": 3,
"column": 50
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 5,
"column": 16
},
{
"value": "2024-06-01T00:00:00Z",
"format": "iso",
"timestamp": 1717200000000,
"line": 6,
"column": 16
},
{
"value": "1705314645123456789",
"format": "unix",
"timestamp": 1705314645123,
"line": 10,
"column": 20
}
]
},
{
"name": "Markdown prose and a table, with issue numbers that are not dates",
"file": "release-notes.md",
"fileType": "markdown",
"expected": [
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 3,
"column": 12
},
{
"value": "2024-W03",
"format": "week",
"timestamp": 1705276800000,
"line": 5,
"column": 8
},
{
"value": "2024-01-15T10:30:45Z",
"format": "iso",
"timestamp": 1705314645000,
"line": 5,
"column": 34
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 9,
"column": 13
},
{
"value": "1705314645",
"format": "unix",
"timestamp": 1705314645000,
"line": 9,
"column": 26
},
{
"value": "2023-11-02",
"format": "simple",
"timestamp": 1698883200000,
"line": 10,
"column": 13
},
{
"value": "1698883200",
"format": "unix",
"timestamp": 1698883200000,
"line": 10,
"column": 26
}
]
},
{
"name": "TOML, where the date type is unquoted and read the same as a string",
"file": "project.toml",
"fileType": "toml",
"expected": [
{
"value": "2024-01-15T10:30:45Z",
"format": "iso",
"timestamp": 1705314645000,
"line": 9,
"column": 7
},
{
"value": "2024-01-15",
"format": "simple",
"timestamp": 1705276800000,
"line": 10,
"column": 16
},
{
"value": "20241231",
"format": "basic",
"timestamp": 1735603200000,
"line": 11,
"column": 17
},
{
"value": "2024-W03-5",
"format": "week",
"timestamp": 1705622400000,
"line": 12,
"column": 12
}
]
},
{
"name": "every notation Date.parse refuses, and the digit runs beside them that are not dates",
"file": "notations.txt",
"fileType": "plaintext",
"expected": [
{
"value": "2024-W03",
"format": "week",
"timestamp": 1705276800000,
"line": 4,
"column": 21
},
{
"value": "2024-W03-1",
"format": "week",
"timestamp": 1705276800000,
"line": 5,
"column": 21
},
{
"value": "2024-015",
"format": "ordinal",
"timestamp": 1705276800000,
"line": 6,
"column": 21
},
{
"value": "20240115",
"format": "basic",
"timestamp": 1705276800000,
"line": 7,
"column": 21
},
{
"value": "20240115T103045Z",
"format": "basic",
"timestamp": 1705314645000,
"line": 8,
"column": 21
},
{
"value": "1705314645123456",
"format": "unix",
"timestamp": 1705314645123,
"line": 9,
"column": 21
},
{
"value": "1705314645123456789",
"format": "unix",
"timestamp": 1705314645123,
"line": 10,
"column": 21
},
{
"value": "Mon, 15 Jan 2024 10:30:45 CET",
"format": "rfc2822",
"timestamp": 1705311045000,
"line": 11,
"column": 21
},
{
"value": "Mon, 15 Jan 2024 10:30:45 CEST",
"format": "rfc2822",
"timestamp": 1705307445000,
"line": 12,
"column": 22
},
{
"value": "Mon, 15 Jan 2024 10:30:45 BST",
"format": "rfc2822",
"timestamp": 1705311045000,
"line": 13,
"column": 21
},
{
"value": "Mon, 15 Jan 2024 10:30:45 JST",
"format": "rfc2822",
"timestamp": 1705282245000,
"line": 14,
"column": 21
},
{
"value": "Mon, 15 Jan 2024 10:30:45 AEST",
"format": "rfc2822",
"timestamp": 1705278645000,
"line": 15,
"column": 21
},
{
"value": "Mon, 15 Jan 2024 10:30:45 IST",
"format": "rfc2822",
"timestamp": 1705294845000,
"line": 16,
"column": 21
}
]
}
]
}