543536409b
* add application (client) name to statuses fixes another thing in #6 * add domain blocking (#496) * add domain blocking fixes another thing from #6 * show "domain blocking" on profile page * fix stuff
30 lines
597 B
JavaScript
30 lines
597 B
JavaScript
let dateFormatter
|
|
|
|
export function getDateFormatter () {
|
|
if (!dateFormatter) {
|
|
dateFormatter = new Intl.DateTimeFormat('en-US', {
|
|
year: 'numeric',
|
|
month: 'long',
|
|
day: 'numeric',
|
|
hour: '2-digit',
|
|
minute: '2-digit'
|
|
})
|
|
}
|
|
return dateFormatter
|
|
}
|
|
|
|
let shortDateFormatter
|
|
|
|
export function getShortDateFormatter () {
|
|
if (!shortDateFormatter) {
|
|
shortDateFormatter = new Intl.DateTimeFormat('en-US', {
|
|
year: 'numeric',
|
|
month: 'short',
|
|
day: 'numeric',
|
|
hour: '2-digit',
|
|
minute: '2-digit'
|
|
})
|
|
}
|
|
return shortDateFormatter
|
|
}
|