Initial commit: Add project files
ci / backend (push) Failing after 12s
ci / frontend (push) Failing after 19s
ci / static (push) Failing after 45s

This commit is contained in:
2026-08-02 05:15:36 +09:00
commit dcd1322d41
636 changed files with 122352 additions and 0 deletions
@@ -0,0 +1,18 @@
export function formatCurrency(value: number | null | undefined, currency: string, locale = 'ko-KR'): string {
if (value == null || Number.isNaN(value)) return '—'
return new Intl.NumberFormat(locale, { style: 'currency', currency, maximumFractionDigits: 2 }).format(value)
}
export function formatPercent(value: number | null | undefined, digits = 2, locale = 'ko-KR'): string {
if (value == null || Number.isNaN(value)) return '—'
return new Intl.NumberFormat(locale, { style: 'percent', minimumFractionDigits: digits, maximumFractionDigits: digits }).format(value)
}
export function formatQuantity(value: number | null | undefined, digits = 4, locale = 'ko-KR'): string {
if (value == null || Number.isNaN(value)) return '—'
return new Intl.NumberFormat(locale, { maximumFractionDigits: digits }).format(value)
}
export function formatAsOf(value: string | Date | null | undefined, locale = 'ko-KR'): string {
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)
}