forked from FoundKeyGang/FoundKey
client: Fix relative timestamps
This commit is contained in:
parent
c20352b22e
commit
27cf3c4e05
1 changed files with 2 additions and 2 deletions
|
@ -52,9 +52,9 @@ const relative = $computed(() => {
|
||||||
if (ago >= HOUR) {
|
if (ago >= HOUR) {
|
||||||
return i18n.t('_ago.hoursAgo', { n: Math.round(ago / HOUR).toString() });
|
return i18n.t('_ago.hoursAgo', { n: Math.round(ago / HOUR).toString() });
|
||||||
} else if (ago >= MINUTE) {
|
} else if (ago >= MINUTE) {
|
||||||
return i18n.t('_ago.minutesAgo', { n: (~~(ago / MINUTE)).toString() });
|
return i18n.t('_ago.minutesAgo', { n: Math.floor(ago / MINUTE).toString() });
|
||||||
} else if (ago >= 10 * SECOND) {
|
} else if (ago >= 10 * SECOND) {
|
||||||
return i18n.t('_ago.secondsAgo', { n: (~~(ago % MINUTE)).toString() });
|
return i18n.t('_ago.secondsAgo', { n: Math.floor(ago / SECOND).toString() });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue