pinafore/routes/_utils/formatters.js
Nolan Lawson 543536409b
add application (client) name to statuses (#497)
* 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
2018-08-26 15:38:45 -07:00

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
}