Update.
This commit is contained in:
parent
5b88350ff2
commit
20d8d27f03
@ -33,13 +33,22 @@ class MessageListElement extends HTMLElement {
|
||||
const minutes = Math.floor((diffMs % (1000 * 60 * 60)) / (1000 * 60));
|
||||
const seconds = Math.floor((diffMs % (1000 * 60)) / 1000);
|
||||
if (days) {
|
||||
if (days > 1)
|
||||
return `${days} days ago`
|
||||
else
|
||||
return `${days} day ago`
|
||||
}
|
||||
if (hours) {
|
||||
if (hours > 1)
|
||||
return `${hours} hours ago`
|
||||
else
|
||||
return `${hours} hour ago`
|
||||
}
|
||||
if (minutes)
|
||||
if (minutes > 1)
|
||||
return `${minutes} minutes ago`
|
||||
else
|
||||
return `${minutes} minute ago`
|
||||
|
||||
return `just now`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user