mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-22 19:49:34 +00:00
merchant: round in ago() function
This commit is contained in:
parent
38401262cf
commit
2d1882108f
1 changed files with 5 additions and 1 deletions
|
@ -57,7 +57,11 @@ function ago(epoch) {
|
|||
var delta = now - epoch;
|
||||
|
||||
if(delta < 60) {
|
||||
return delta + " " + qsTr("seconds ago")
|
||||
if (delta <= 1) {
|
||||
return 1 + " " + qsTr("second ago")
|
||||
} else {
|
||||
return Math.floor(delta) + " " + qsTr("seconds ago")
|
||||
}
|
||||
} else if (delta >= 60 && delta <= 3600) {
|
||||
if(delta >= 60 && delta < 120){
|
||||
return 1 + " " + qsTr("minute ago")
|
||||
|
|
Loading…
Reference in a new issue