mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-16 15:58:11 +00:00
Utils.js simplify ago func
This commit is contained in:
parent
b7ba9437d8
commit
7d2f2cacbf
1 changed files with 5 additions and 5 deletions
10
js/Utils.js
10
js/Utils.js
|
@ -57,12 +57,12 @@ function ago(epoch) {
|
|||
|
||||
if(delta < 60)
|
||||
return qsTr("%n second(s) ago", "0", Math.floor(delta))
|
||||
else if (delta >= 60 && delta <= 3600)
|
||||
else if (delta < 3600)
|
||||
return qsTr("%n minute(s) ago", "0", Math.floor(delta / 60))
|
||||
else if (delta >= 3600 && delta <= 86400)
|
||||
return qsTr("%n hour(s) ago", "0", Math.floor(delta / 60 / 60))
|
||||
else if (delta >= 86400)
|
||||
return qsTr("%n day(s) ago", "0", Math.floor(delta / 24 / 60 / 60))
|
||||
else if (delta < 86400)
|
||||
return qsTr("%n hour(s) ago", "0", Math.floor(delta / 3600))
|
||||
else
|
||||
return qsTr("%n day(s) ago", "0", Math.floor(delta / 86400))
|
||||
}
|
||||
|
||||
function netTypeToString(){
|
||||
|
|
Loading…
Reference in a new issue