See how visible the eclipse is from where you are!
Something went wrong. Try again.
1234567891011121314151617181920212223242526export const formatDate = (date: Date, timeZone?: string) => new Intl.DateTimeFormat('en-GB', { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric', timeZone, }).format(date)
export const formatTime = (date: Date, timeZone?: string) => new Intl.DateTimeFormat('en-GB', { hour: '2-digit', minute: '2-digit', hour12: false, timeZoneName: 'short', timeZone, }).format(date)
export const formatShortTime = (date: Date, timeZone?: string) => new Intl.DateTimeFormat('en-GB', { hour: '2-digit', minute: '2-digit', hour12: false, timeZone, }).format(date)
export function formatDuration(minutes: number): string { const hours = Math.floor(minutes / 60) const remainder = minutes % 60 return hours ? `${hours} hr ${remainder} min` : `${remainder} min`}
export function formatCentralDuration(seconds: number): string { const minutes = Math.floor(seconds / 60) return `${minutes} min ${String(seconds % 60).padStart(2, '0')} sec`}