Skip to content

Commit

Permalink
fix id month
Browse files Browse the repository at this point in the history
  • Loading branch information
Jugurtha Bouhadoun committed Jun 6, 2024
1 parent 0b54553 commit 9ff7c05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion views/data/data-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function DataEntry({entry: {name, isDirectory, fileInfo}, path}) {
const fileDate = fileInfo?.date && new Date(fileInfo.date)
const dateSearchRegExp = /^(?<year>\d{4})-(((?<month>\d{2})-(?<day>\d{2}))|(?<quarter>T[1-4]))$/
const {year, quarter, month, day} = dateSearchRegExp.exec(name)?.groups || {}
const humanDateDirName = year && month && day ? (new Date(year, month, day)).toLocaleString('fr-FR', dateFormatOptions.dateFormatOptionsLongDate) :
const humanDateDirName = year && month && day ? (new Date(year, (month - 1), day)).toLocaleString('fr-FR', dateFormatOptions.dateFormatOptionsLongDate) :
year && quarter && `${translatedQuarter[quarter]} ${year}`
const humanDirName = humanDateDirName ? `export du ${humanDateDirName}` : translatedName[[...path, name].join('/')] || translatedName[name]

Expand Down

0 comments on commit 9ff7c05

Please sign in to comment.