diff --git a/parse_orgmode_to_json.mjs b/parse_orgmode_to_json.mjs index 6102569..0e587e8 100644 --- a/parse_orgmode_to_json.mjs +++ b/parse_orgmode_to_json.mjs @@ -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') }