export function formatCurrency(value, currency, locale = 'ko-KR') { if (value == null || Number.isNaN(value)) return '—'; return new Intl.NumberFormat(locale, { style: 'currency', currency, maximumFractionDigits: 2 }).format(value); } export function formatPercent(value, digits = 2, locale = 'ko-KR') { if (value == null || Number.isNaN(value)) return '—'; return new Intl.NumberFormat(locale, { style: 'percent', minimumFractionDigits: digits, maximumFractionDigits: digits }).format(value); } export function formatQuantity(value, digits = 4, locale = 'ko-KR') { if (value == null || Number.isNaN(value)) return '—'; return new Intl.NumberFormat(locale, { maximumFractionDigits: digits }).format(value); } export function formatAsOf(value, locale = 'ko-KR') { if (!value) return '—'; const date = value instanceof Date ? value : new Date(value); if (Number.isNaN(date.getTime())) return '—'; return new Intl.DateTimeFormat(locale, { dateStyle: 'medium', timeStyle: 'short', timeZone: 'Asia/Seoul' }).format(date); }