12 lines
335 B
TypeScript
12 lines
335 B
TypeScript
export const formatNumberWithPeriods = (number: number) => {
|
|
return new Intl.NumberFormat('id-ID').format(number)
|
|
}
|
|
export const formatDate = (isoDate: string): string => {
|
|
const date = new Date(isoDate)
|
|
return new Intl.DateTimeFormat('id-ID', {
|
|
day: '2-digit',
|
|
month: '2-digit',
|
|
year: 'numeric',
|
|
}).format(date)
|
|
}
|