param date export function formatDate ( date , separator = "at" ) { const lang = typeof window === "undefined" ? "en-US" : window . navigator . languages [ 0 ] ; const dateString = date . toLocaleDateString ( lang , { weekday : "long" , year : "numeric" , month : "long" , day : "numeric" , } ) ; const timeString = date . toLocaleTimeString ( lang , { } ) ; return `${ dateString } ${ separator } ${ timeString }` ; } param date export function formatDateShort ( date , separator = "at" ) { const lang = typeof window === "undefined" ? "en-US" : window . navigator . languages [ 0 ] ; const dateString = date . toLocaleDateString ( lang , { year : "numeric" , month : "short" , day : "numeric" , } ) ; const timeString = date . toLocaleTimeString ( lang , { hour : "numeric" , minute : "2-digit" , } ) ; return `${ dateString } ${ separator } ${ timeString }` ; } param date export function formatDateExtraShort ( date ) { const lang = typeof window === "undefined" ? "en-US" : window . navigator . languages [ 0 ] ; const dateString = date . toLocaleDateString ( lang , { year : "numeric" , month : "short" , day : "numeric" , } ) ; return dateString ; }