mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-21 15:33:17 +01:00
fix(ui): Second shouldn't be plural if value is 1
This commit is contained in:
parent
f9efa28223
commit
c31cb7540d
@ -14,7 +14,8 @@ export const helper = {
|
|||||||
let minutes = (differenceInMs / 60000).toFixed(0);
|
let minutes = (differenceInMs / 60000).toFixed(0);
|
||||||
return minutes + " minute" + (minutes !== "1" ? "s" : "") + " ago";
|
return minutes + " minute" + (minutes !== "1" ? "s" : "") + " ago";
|
||||||
}
|
}
|
||||||
return (differenceInMs / 1000).toFixed(0) + " seconds ago";
|
let seconds = (differenceInMs / 1000).toFixed(0);
|
||||||
|
return seconds + " second" + (seconds !== "1" ? "s" : "") + " ago";
|
||||||
},
|
},
|
||||||
prettifyTimestamp(timestamp) {
|
prettifyTimestamp(timestamp) {
|
||||||
let date = new Date(timestamp);
|
let date = new Date(timestamp);
|
||||||
|
Loading…
Reference in New Issue
Block a user