#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
export function formatUTC(iso: string, withTime: boolean): string {
const date = new Date(iso);
if (Number.isNaN(date.getTime())) return "-";
const formatted = new Intl.DateTimeFormat("en-US", {
month: "short",
day: "numeric",
year: "numeric",
...(withTime ? { hour: "2-digit", minute: "2-digit", hour12: false } : {}),
timeZone: "UTC",
}).format(date);
return withTime ? `${formatted} UTC` : formatted;
}