feat: update dashboard contents to include category names and format dates

This commit is contained in:
fredy.siswanto
2025-03-06 19:47:45 +07:00
parent 4754e75f59
commit b61235a3b5
4 changed files with 64 additions and 26 deletions
+8
View File
@@ -1,3 +1,11 @@
export const formatNumberWithPeriods = (number: number) => {
return new Intl.NumberFormat('id-ID').format(number)
}
export const formatDate = (isoDate: string): string => {
const date = new Date(isoDate)
const day = date.getDate().toString().padStart(2, '0')
const month = (date.getMonth() + 1).toString().padStart(2, '0') // Month is zero-based
const year = date.getFullYear()
return `${day}/${month}/${year}`
}