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

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