Use ICU number/plural formatting
This commit is contained in:
parent
aba8882d0a
commit
da24cc5e95
30 changed files with 254 additions and 222 deletions
|
@ -166,13 +166,13 @@ export function formatTime(
|
|||
|
||||
if (diff < HOUR) {
|
||||
return i18n('icu:minutesAgo', {
|
||||
minutes: Math.floor(diff / MINUTE).toString(),
|
||||
minutes: Math.floor(diff / MINUTE),
|
||||
});
|
||||
}
|
||||
|
||||
if (isRelativeTime) {
|
||||
return i18n('icu:hoursAgo', {
|
||||
hours: Math.floor(diff / HOUR).toString(),
|
||||
hours: Math.floor(diff / HOUR),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue