/**
 * format.mjs — date/time display formatters for INDEX.md (C29).
 */
/** Format date for display in INDEX.md */
export function formatDateDisplay(date, format) {
    const yy = String(date.getFullYear()).slice(2);
    const mm = String(date.getMonth() + 1).padStart(2, '0');
    const dd = String(date.getDate()).padStart(2, '0');
    switch (format) {
        case 'DD-MM-YY':
            return `${dd}/${mm}/${yy}`;
        case 'MM-DD-YY':
            return `${mm}/${dd}/${yy}`;
        case 'YY-MM-DD':
        default:
            return `${yy}/${mm}/${dd}`;
    }
}
/** Format time for display in INDEX.md */
export function formatTimeDisplay(date, format) {
    const h = date.getHours();
    const m = String(date.getMinutes()).padStart(2, '0');
    if (format === '12h') {
        const period = h >= 12 ? 'PM' : 'AM';
        const h12 = h % 12 || 12;
        return `${h12}:${m} ${period}`;
    }
    return `${String(h).padStart(2, '0')}:${m}`;
}
//# sourceMappingURL=format.mjs.map