add linter
This commit is contained in:
@@ -57,15 +57,9 @@ Date.prototype.difference = function (start_at) {
|
||||
if (!this) {
|
||||
return '--:--'
|
||||
}
|
||||
let end_at = this
|
||||
if (!start_at) {
|
||||
end_at = new Date()
|
||||
start_at = this
|
||||
}
|
||||
let timer = Math.floor((end_at.getTime() - start_at.getTime()) / 1000)
|
||||
let hours = Math.floor(timer / 3600)
|
||||
let minutes = Math.floor((timer - hours * 3600) / 60)
|
||||
let secondes = timer - hours * 3600 - minutes * 60
|
||||
const timer = Math.floor(((!start_at ? (new Date()) : this).getTime() - (!start_at ? this : start_at).getTime()) / 1000)
|
||||
const hours = Math.floor(timer / 3600)
|
||||
const minutes = Math.floor((timer - hours * 3600) / 60)
|
||||
const secondes = timer - hours * 3600 - minutes * 60
|
||||
return `${hours}:${String(minutes).padStart(2, '0')}:${String(secondes).padStart(2, '0')}`
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user