debugging of tsc errors
This commit is contained in:
@@ -69,12 +69,19 @@ export const formatRelativeDate = (
|
||||
numeric: 'auto'
|
||||
})
|
||||
let duration = (toDate - fromDate) / 1000
|
||||
let output = ''
|
||||
|
||||
for (let i = 0; i <= DIVISIONS.length; i++) {
|
||||
const division = DIVISIONS[i]
|
||||
if (Math.abs(duration) < division.amount)
|
||||
return RELATIVE_DATE_FORMATTER.format(Math.round(duration), division.name)
|
||||
if (Math.abs(duration) < division.amount) {
|
||||
output = RELATIVE_DATE_FORMATTER.format(
|
||||
Math.round(duration),
|
||||
division.name
|
||||
)
|
||||
}
|
||||
|
||||
duration /= division.amount
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
|
Reference in New Issue
Block a user