feat: update dashboard contents to include category names and format dates
This commit is contained in:
@@ -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}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user