Client - a user can request and download data export archive
This commit is contained in:
@ -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] }
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user