two digit date in file name

This commit is contained in:
2024-12-12 14:07:37 +00:00
parent 291dd09c14
commit 1590cd16f6
2 changed files with 14 additions and 2 deletions
+7 -1
View File
@@ -187,7 +187,13 @@ export default async function handler(req, res) {
let month = repDate.getMonth() + 1;
let year = repDate.getFullYear();
const pdfFileName = year + "-" + month + "-" + day + "_-_Appeal_Form";
const pdfFileName =
year +
"-" +
("0" + month).slice(-2) +
"-" +
("0" + day).slice(-2) +
"_-_Appeal_Form";
await createAppealPDFBlob(
renderedPDF,