format decimals
This commit is contained in:
parent
1ee46ad93b
commit
965bb883f5
@ -113,10 +113,10 @@ export function formatSeconds(value?: string) {
|
|||||||
if(!value) return ''
|
if(!value) return ''
|
||||||
const duration = Number(value.replace(/s/, ''))
|
const duration = Number(value.replace(/s/, ''))
|
||||||
if(duration > 24*60*60) {
|
if(duration > 24*60*60) {
|
||||||
return `${duration / ( 24 * 60 * 60)} days`
|
return `${(duration / ( 24 * 60 * 60)).toFixed()} days`
|
||||||
}
|
}
|
||||||
if(duration > 60*60) {
|
if(duration > 60*60) {
|
||||||
return `${duration / (60 * 60)} hours`
|
return `${duration / (60 * 60).toFixed()} hours`
|
||||||
}
|
}
|
||||||
if(duration > 60) {
|
if(duration > 60) {
|
||||||
return `${duration / 60} mins`
|
return `${duration / 60} mins`
|
||||||
|
Loading…
Reference in New Issue
Block a user