LibJS: Parse dates like "1 Jan 2001 00:00:00 GMT"

This commit is contained in:
jg99 2025-02-05 09:39:47 -07:00 committed by Andrew Kaster
commit 51434c2ed0
Notes: github-actions[bot] 2025-02-05 22:07:53 +00:00
2 changed files with 2 additions and 0 deletions

View file

@ -47,6 +47,7 @@ test("basic functionality", () => {
expect(Date.parse("Wednesday, Jan 15, 2025")).toBe(1736920800000);
expect(Date.parse("2025-01-13 00:00:00.000")).toBe(1736748000000);
expect(Date.parse("2021-04-21T15:00:00+0000")).toBe(1619017200000);
expect(Date.parse("1 Jan 2001 00:00:00 GMT")).toBe(978307200000);
// FIXME: Create a scoped time zone helper when bytecode supports the `using` declaration.
setTimeZone(originalTimeZone);