2020-11-29 23:13:27 +01:00
|
|
|
import { LOCALE } from '../_static/intl'
|
2021-04-02 20:02:01 +02:00
|
|
|
import { thunk } from './thunk'
|
2020-11-29 23:13:27 +01:00
|
|
|
|
2021-04-02 20:02:01 +02:00
|
|
|
export const absoluteDateFormatter = thunk(() => new Intl.DateTimeFormat(LOCALE, {
|
2019-01-14 00:56:39 +01:00
|
|
|
year: 'numeric',
|
|
|
|
month: 'long',
|
|
|
|
day: 'numeric',
|
|
|
|
hour: '2-digit',
|
|
|
|
minute: '2-digit'
|
2021-04-02 20:02:01 +02:00
|
|
|
}))
|
2018-08-27 00:38:45 +02:00
|
|
|
|
2021-04-02 20:02:01 +02:00
|
|
|
export const shortAbsoluteDateFormatter = thunk(() => new Intl.DateTimeFormat(LOCALE, {
|
2019-01-14 00:56:39 +01:00
|
|
|
year: 'numeric',
|
|
|
|
month: 'short',
|
|
|
|
day: 'numeric',
|
|
|
|
hour: '2-digit',
|
|
|
|
minute: '2-digit'
|
2021-04-02 20:02:01 +02:00
|
|
|
}))
|
2021-03-22 02:03:53 +01:00
|
|
|
|
2021-04-02 20:02:01 +02:00
|
|
|
export const dayOnlyAbsoluteDateFormatter = thunk(() => new Intl.DateTimeFormat(LOCALE, {
|
2021-03-22 02:03:53 +01:00
|
|
|
year: 'numeric',
|
|
|
|
month: 'short',
|
|
|
|
day: 'numeric'
|
2021-04-02 20:02:01 +02:00
|
|
|
}))
|