Files
alla-allaos-fullstack/src/features/crm-demo/utils/format.ts
2026-06-25 21:09:27 +07:00

18 lines
407 B
TypeScript

export function formatCurrency(value: number) {
return new Intl.NumberFormat('th-TH', {
style: 'currency',
currency: 'THB',
maximumFractionDigits: 0
}).format(value);
}
import { formatDate as formatGlobalDate } from '@/lib/date-format';
export function formatDate(value: string) {
return formatGlobalDate(value);
}
export function formatPercent(value: number) {
return `${value}%`;
}