2026-05-20 18:09:11 -04:00
|
|
|
export function formatCurrency(amount: number): string {
|
|
|
|
|
return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(amount);
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-22 17:29:37 -04:00
|
|
|
export function formatBidAmount(amount: number): string {
|
|
|
|
|
return amount > 0 ? formatCurrency(amount) : 'Not priced';
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-20 18:09:11 -04:00
|
|
|
export function formatDate(iso: string): string {
|
|
|
|
|
return new Date(iso).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function formatDateTime(iso: string | null): string {
|
|
|
|
|
if (!iso) return '-';
|
|
|
|
|
return new Date(iso).toLocaleString('en-US', {
|
|
|
|
|
month: 'short',
|
|
|
|
|
day: 'numeric',
|
|
|
|
|
year: 'numeric',
|
|
|
|
|
hour: 'numeric',
|
|
|
|
|
minute: '2-digit',
|
|
|
|
|
});
|
|
|
|
|
}
|