search created date

This commit is contained in:
Tykayn 2023-09-24 10:05:17 +02:00 committed by tykayn
parent e7a1921a3b
commit 4fd1a64015
1 changed files with 6 additions and 1 deletions

View File

@ -318,7 +318,12 @@ fs.readFile(sourceFilePath, 'utf8', function (err, data) {
// sans heure: "2022-12-21 mer."
convertedDate = moment(dateFound[0], 'YYYY-MM-DD ddd')
} else if (dateFound[0].length === 21) {
}
else if (dateFound[0].length === 19) {
// avec secondes: "2022-11-01 00:44:12"
convertedDate = moment(dateFound[0], 'YYYY-MM-DD HH:mm:ss')
}
else if (dateFound[0].length === 21) {
// avec heure: "2022-11-01 mar. 00:44"
convertedDate = moment(dateFound[0], 'YYYY-MM-DD ddd HH:mm')
}