Client - a user can request and download data export archive

This commit is contained in:
Sam
2023-03-01 21:16:25 +01:00
parent 073c677b92
commit 67d7fc13b5
16 changed files with 207 additions and 7 deletions

View File

@ -111,14 +111,16 @@ export const formatDate = (
timezone: string,
dateFormat: string,
withTime = true,
language: string | null = null
language: string | null = null,
withSeconds = false
): string => {
if (!language) {
language = locale.value
}
const timeFormat = withTime ? (withSeconds ? ' HH:mm:ss' : ' HH:mm') : ''
return format(
getDateWithTZ(dateString, timezone),
`${getDateFormat(dateFormat, language)}${withTime ? ' HH:mm' : ''}`,
`${getDateFormat(dateFormat, language)}${timeFormat}`,
{ locale: localeFromLanguage[language] }
)
}