Skip to content

Commit

Permalink
fix: date format aaaammdd
Browse files Browse the repository at this point in the history
  • Loading branch information
simone-amadio-acn committed Dec 19, 2023
1 parent 139be5a commit 2ea32cc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"body-parser": "^1.19.2",
"bullmq": "^1.85.1",
"child_process": "^1.0.2",
"date-fns": "^3.0.0",
"dateformat": "^5.0.3",
"express": "^4.17.3",
"express-basic-auth": "^1.2.1",
Expand Down
9 changes: 2 additions & 7 deletions utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { auditDictionary } from "pa-website-validator/dist/storage/auditDictiona
import axios from "axios";
import path from "path";
import { fileURLToPath } from "url";
import { format } from "date-fns";

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
Expand Down Expand Up @@ -125,13 +126,7 @@ const mapPA2026Body = async (
`Report scansione ` +
siteUrl.host +
"_" +
new Date()
.toLocaleDateString("en-US", {
year: "numeric",
month: "2-digit",
day: "2-digit",
})
.replace(/\//g, "") +
format(new Date(), "yyyyMMdd") +
"_" +
crawlerVersion +
"_" +
Expand Down

0 comments on commit 2ea32cc

Please sign in to comment.