Timestamp in milliseconds since the Unix epoch.
A locale-formatted string such as "Mar 26, 2:15 PM".
formatTimestamp(1711468500000);
// => "Mar 26, 2:15 PM" (en-US locale)
export function formatTimestamp(epochMs: number): string {
return new Date(epochMs).toLocaleString(undefined, {
month: 'short',
day: 'numeric',
hour: 'numeric',
minute: '2-digit',
});
}
Format a Unix epoch timestamp (in milliseconds) as a short, locale-aware "month day, hour:minute" string for UI surfaces like the history and excluded-products lists in the settings drawer. Shared so both panels render the same shape without drifting over time.