Open
Description
It could be great to handle date formatting with i18next and give example in the code
- https://github.com/BearStudio/start-ui-web/blob/master/src/lib/i18n/config.ts
- https://www.i18next.com/translation-function/formatting#datetime
i18next
.use(initReactI18next)
.init({
resources,
lng: DEFAULT_I18N_LANGUAGE,
interpolation: {
escapeValue: false,
format: (value, format) => {
if (isDate(value)) {
return formatDate(value, format);
}
// List of custom formatters
if (format === 'minutesToHours') {
return minutesToHours(value)?.toString();
}
return value;
},
},
})
"create_by": "{{displayName}} le {{date, dd MMMM yyyy}}"
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
In Progress