This commit is contained in:
Henry Dollman
2024-07-11 00:38:30 -04:00
parent fa9e257864
commit 82888684d9
10 changed files with 742 additions and 437 deletions

View File

@@ -32,7 +32,7 @@ export const updateServerList = () => {
})
}
export const shortDateFormatter = new Intl.DateTimeFormat('en-US', {
const shortTimeFormatter = new Intl.DateTimeFormat(undefined, {
// day: 'numeric',
// month: 'numeric',
// year: '2-digit',
@@ -40,5 +40,14 @@ export const shortDateFormatter = new Intl.DateTimeFormat('en-US', {
hour: 'numeric',
minute: 'numeric',
})
export const formatShortTime = (timestamp: string) => shortTimeFormatter.format(new Date(timestamp))
export const formatDateShort = (timestamp: string) => shortDateFormatter.format(new Date(timestamp))
const shortDateFormatter = new Intl.DateTimeFormat(undefined, {
day: 'numeric',
month: 'short',
// year: '2-digit',
// hour12: false,
hour: 'numeric',
minute: 'numeric',
})
export const formatShortDate = (timestamp: string) => shortDateFormatter.format(new Date(timestamp))