From 385077c96dbf91b51c9d7b465e0654c789784041 Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 9 Sep 2024 00:38:02 -0700 Subject: ... --- app.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app.mjs') diff --git a/app.mjs b/app.mjs index 77fa213..3c81877 100755 --- a/app.mjs +++ b/app.mjs @@ -29,7 +29,7 @@ const getChartSupplementDiretory = async () => { if (files[region]) { files[region].push({ url, date }); if (moment() >= date) { - files[region].current = { url, date: m[2] }; + files[region].current = { url, date: date.format('YYYY-MM-DD') }; } } } @@ -66,7 +66,7 @@ const getTerminalProcedurePublication = async () => { files[region].push({ url, date }); files[region].current = { url, - date: date.format("YYYYMMDD"), + date: date.format("YYYY-MM-DD"), }; } } @@ -87,7 +87,7 @@ const res = [ for (let r of res) { for (let region of Object.keys(r.files)) { const cur = r.files[region].current; - const file = `${r.prefix}-${region}-${cur.date}.pdf`; + const file = `${r.prefix}-${region.toLowerCase()}-${cur.date}.pdf`; const fileExists = (path) => fs.stat(path).then( () => true, -- cgit v1.2.3-70-g09d2