1
0
mirror of https://github.com/dwaxweiler/connector-mobilizon synced 2025-06-05 21:59:25 +02:00

localise dates

This commit is contained in:
Daniel Waxweiler
2021-05-04 11:16:18 +02:00
parent 65b42ba1e7
commit a8584096d8
9 changed files with 27 additions and 30 deletions

View File

@@ -2,9 +2,9 @@ import DateTimeWrapper from './date-time-wrapper'
export default class Formatter {
static formatDate({ start, end }) {
const startDateTime = new DateTimeWrapper(start)
const endDateTime = new DateTimeWrapper(end)
static formatDate({ locale, start, end }) {
const startDateTime = new DateTimeWrapper({ locale, text: start })
const endDateTime = new DateTimeWrapper({ locale, text: end })
let dateText = startDateTime.getShortDate()
dateText += ' ' + startDateTime.get24Time()
dateText += ' - '