task-b.1
complere
This commit is contained in:
phaichayon
2026-06-15 11:19:31 +07:00
parent 89b39cad38
commit b8cd39eaa4
55 changed files with 4295 additions and 1848 deletions

View File

@@ -0,0 +1,19 @@
export function formatCurrency(value: number) {
return new Intl.NumberFormat('th-TH', {
style: 'currency',
currency: 'THB',
maximumFractionDigits: 0
}).format(value);
}
export function formatDate(value: string) {
return new Intl.DateTimeFormat('th-TH', {
day: '2-digit',
month: 'short',
year: 'numeric'
}).format(new Date(value));
}
export function formatPercent(value: number) {
return `${value}%`;
}