2
0

⬆️ Upgrade dependencies

This commit is contained in:
Baptiste Arnaud
2023-01-14 16:53:34 +01:00
parent 491e60a815
commit 6459fb8ec8
28 changed files with 1584 additions and 1067 deletions

View File

@ -17,10 +17,12 @@ export const parseReadableDate = ({
hour: hasTime ? '2-digit' : undefined,
minute: hasTime ? '2-digit' : undefined,
}
const fromReadable = new Date(from).toLocaleString(
currentLocale,
formatOptions
)
const toReadable = new Date(to).toLocaleString(currentLocale, formatOptions)
const fromReadable = new Date(
hasTime ? from : from.replace(/-/g, '/')
).toLocaleString(currentLocale, formatOptions)
console.log(to, to.replace(/-/g, '/'))
const toReadable = new Date(
hasTime ? to : to.replace(/-/g, '/')
).toLocaleString(currentLocale, formatOptions)
return `${fromReadable}${isRange ? ` to ${toReadable}` : ''}`
}