mirror of
https://github.com/dwaxweiler/connector-mobilizon
synced 2025-06-05 21:59:25 +02:00
localise dates
This commit is contained in:
@@ -2,12 +2,12 @@ import test from 'ava'
|
||||
import Formatter from './formatter'
|
||||
|
||||
test('#formatDate one date', t => {
|
||||
const date = Formatter.formatDate({ start: '2021-04-15T10:30:00Z', end: '2021-04-15T15:30:00Z' })
|
||||
const date = Formatter.formatDate({ locale: 'en-GB', start: '2021-04-15T10:30:00Z', end: '2021-04-15T15:30:00Z' })
|
||||
t.is(date, '15/04/2021 12:30 - 17:30')
|
||||
})
|
||||
|
||||
test('#formatDate two dates', t => {
|
||||
const date = Formatter.formatDate({ start: '2021-04-15T10:30:00Z', end: '2021-04-16T15:30:00Z' })
|
||||
const date = Formatter.formatDate({ locale: 'en-GB', start: '2021-04-15T10:30:00Z', end: '2021-04-16T15:30:00Z' })
|
||||
t.is(date, '15/04/2021 12:30 - 16/04/2021 17:30')
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user