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