mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fix time formatting, again
This commit is contained in:
parent
eea02bf571
commit
97858b6eab
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user