|
|
|
@ -880,22 +880,22 @@ export function formatSecondsToTimeAgo(secs) {
|
|
|
|
|
const days = Math.floor(hours / 24);
|
|
|
|
|
|
|
|
|
|
if (seconds < 60) {
|
|
|
|
|
if (seconds <= 1) {
|
|
|
|
|
if (seconds === 1) {
|
|
|
|
|
return T.global.time.oneSecondAgo;
|
|
|
|
|
}
|
|
|
|
|
return T.global.time.xSecondsAgo.replace("<x>", "" + seconds);
|
|
|
|
|
} else if (minutes < 60) {
|
|
|
|
|
if (minutes <= 1) {
|
|
|
|
|
if (minutes === 1) {
|
|
|
|
|
return T.global.time.oneMinuteAgo;
|
|
|
|
|
}
|
|
|
|
|
return T.global.time.xMinutesAgo.replace("<x>", "" + minutes);
|
|
|
|
|
} else if (hours < 24) {
|
|
|
|
|
if (hours <= 1) {
|
|
|
|
|
if (hours === 1) {
|
|
|
|
|
return T.global.time.oneHourAgo;
|
|
|
|
|
}
|
|
|
|
|
return T.global.time.xHoursAgo.replace("<x>", "" + hours);
|
|
|
|
|
} else {
|
|
|
|
|
if (days <= 1) {
|
|
|
|
|
if (days === 1) {
|
|
|
|
|
return T.global.time.oneDayAgo;
|
|
|
|
|
}
|
|
|
|
|
return T.global.time.xDaysAgo.replace("<x>", "" + days);
|
|
|
|
|