chore: improve queue admin

This commit is contained in:
tdurieux
2021-09-26 07:52:00 +02:00
parent 55d1d38452
commit 14f1d7a246
2 changed files with 55 additions and 3 deletions

View File

@@ -153,7 +153,7 @@ angular
}
if (seconds instanceof Date)
seconds = Math.round((Date.now() - seconds) / 1000);
if (typeof seconds == "string")
if (typeof seconds == "string" || typeof seconds == "number")
seconds = Math.round((Date.now() - new Date(seconds)) / 1000);
var suffix = seconds < 0 ? "from now" : "ago";