mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Make util.scand a bit more flexible with dates which don't match the given format (bug 1910431)
This commit is contained in:
parent
bde36f28be
commit
230d7f9229
3 changed files with 108 additions and 110 deletions
|
@ -243,6 +243,12 @@ describe("Scripting", function () {
|
|||
|
||||
value = await myeval(`util.scand(2, "4/15/07 3:14:15 am").toString()`);
|
||||
expect(new Date(value)).toEqual(date);
|
||||
|
||||
value = await myeval(`util.scand("mmddyyyy", "07/15/2007").toString()`);
|
||||
expect(new Date(value)).toEqual(new Date("07/15/2007"));
|
||||
|
||||
value = await myeval(`util.scand("mmddyyyy", "07a15b2007").toString()`);
|
||||
expect(new Date(value)).toEqual(new Date("07/15/2007"));
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue