14 lines
363 B
TypeScript
14 lines
363 B
TypeScript
export function formatCount(value: number): string {
|
|
return new Intl.NumberFormat('en-US').format(value)
|
|
}
|
|
|
|
export function formatDateTime(value: string | number | Date): string {
|
|
return new Intl.DateTimeFormat('en-US', {
|
|
year: 'numeric',
|
|
month: '2-digit',
|
|
day: '2-digit',
|
|
hour: '2-digit',
|
|
minute: '2-digit'
|
|
}).format(new Date(value))
|
|
}
|