mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-16 13:46:16 +02:00
Format all files with Prettier
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
import moment from "moment";
|
||||
|
||||
export function toLocaleDateString(date, { inputFormat, outputFormat = "LLL" } = {}) {
|
||||
export function toLocaleDateString(
|
||||
date,
|
||||
{ inputFormat, outputFormat = "LLL" } = {}
|
||||
) {
|
||||
const parsedDate = inputFormat ? moment(date, inputFormat) : moment(date);
|
||||
return parsedDate
|
||||
.locale(ForisTranslations.locale)
|
||||
.format(outputFormat);
|
||||
return parsedDate.locale(ForisTranslations.locale).format(outputFormat);
|
||||
}
|
||||
|
Reference in New Issue
Block a user