fix
This commit is contained in:
@@ -24,10 +24,7 @@ export const formatDate = (date, format = 'YYYY-MM-DD') => {
|
||||
const month = String(d.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(d.getDate()).padStart(2, '0')
|
||||
|
||||
return format
|
||||
.replace('YYYY', year)
|
||||
.replace('MM', month)
|
||||
.replace('DD', day)
|
||||
return format.replace('YYYY', year).replace('MM', month).replace('DD', day)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,4 +38,4 @@ export const formatPercent = (value, decimals = 1) => {
|
||||
return '0%'
|
||||
}
|
||||
return `${Number(value).toFixed(decimals)}%`
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user