1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #18234 from calixteman/improve_date_parsing

Improve date parsing in the js sandbox
This commit is contained in:
Tim van der Meij 2024-06-14 18:25:36 +02:00 committed by GitHub
commit aa68b8b4b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 2 deletions

View file

@ -628,6 +628,10 @@ describe("Scripting", function () {
await check("12", "mm", "2000/12/01");
await check("2022", "yyyy", "2022/01/01");
await check("a1$9bbbb21", "dd/mm/yyyy", "2021/09/01");
await check("1/2/2024", "dd/mm/yyyy", "2024/02/01");
await check("01/2/2024", "dd/mm/yyyy", "2024/02/01");
await check("1/02/2024", "dd/mm/yyyy", "2024/02/01");
await check("01/02/2024", "dd/mm/yyyy", "2024/02/01");
// The following test isn't working as expected because
// the quickjs date parser has been replaced by the browser one