1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:17:45 +00:00

LibJS: Clip parsed IS0 8601 strings to +/- 8.64e15

This commit is contained in:
Timothy Flynn 2022-01-14 08:34:47 -05:00 committed by Linus Groh
parent aea4f79b57
commit 643992904c
2 changed files with 11 additions and 7 deletions

View file

@ -31,3 +31,8 @@ test("basic functionality", () => {
expect(Date.parse("1970-06-30T13:30Zoo")).toBe(NaN);
expect(Date.parse("2020T13:30.40:")).toBe(NaN);
});
test("time clip", () => {
expect(Date.parse("+999999")).toBeNaN();
expect(Date.parse("-999999")).toBeNaN();
});