/** * Formats a Date as "dd/mm/yyyy", "dd/mm/yyyy hh:mm:ss", or time-only. * Optionally returns user-friendly Danish labels like "I dag" or "I går". * * Examples: * - formatDate(new Date(), { userFriendlyLabel: true }) => "I dag" * - formatDate(new Date(), { userFriendlyLabel: true, showTime: true }) => "I dag, kl. 14:30" * - formatDate(date, { showTime: true }) => "10.03.2026 14:30" * - formatDate(date, { timeOnly: true }) => "14:30" * - formatDate(date, { showTime: true, ignoreDateIfSame: true }) => "14:30" for today, otherwise "10.03.2026 14:30" * - formatDate('2026-03-10T14:30:00.000Z', { showTime: true, ignoreTimezone: true }) => "10.03.2026 14:30" regardless of the viewer's timezone * * @param date - The Date or date-parsable value to format * @param options.showTime - If true, append time "hh:mm" or "hh:mm:ss" * @param options.showSeconds - If true, append seconds when showTime is enabled * @param options.userFriendlyLabel - If true, use "I dag" / "I går" when applicable * @param options.timeOnly - If true, return only the time portion * @param options.ignoreDate - Alias for timeOnly * @param options.ignoreDateIfSame - If true, return only the time when the date is today * @param options.ignoreTimezone - If true, read the date's UTC field values verbatim instead of converting * to the viewer's local timezone. Use this when `date` already carries the intended wall-clock values in * its UTC fields (e.g. a "timestamp without time zone" DB column serialized with a trailing "Z") and any * further timezone conversion would be wrong. "I dag"/"I går" comparisons still use the viewer's real * local "today", since that part is genuinely about the viewer's current day. * @returns A formatted string */ export interface FormatDateOptions { showTime?: boolean; showSeconds?: boolean; userFriendlyLabel?: boolean; timeOnly?: boolean; ignoreDate?: boolean; ignoreDateIfSame?: boolean; ignoreTimezone?: boolean; } export declare function formatDate(date: Date | string | number, options?: FormatDateOptions): string;