mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-22 11:39:31 +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)
|
if(delta < 60)
|
||||||
return qsTr("%n second(s) ago", "0", Math.floor(delta))
|
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))
|
return qsTr("%n minute(s) ago", "0", Math.floor(delta / 60))
|
||||||
else if (delta >= 3600 && delta <= 86400)
|
else if (delta < 86400)
|
||||||
return qsTr("%n hour(s) ago", "0", Math.floor(delta / 60 / 60))
|
return qsTr("%n hour(s) ago", "0", Math.floor(delta / 3600))
|
||||||
else if (delta >= 86400)
|
else
|
||||||
return qsTr("%n day(s) ago", "0", Math.floor(delta / 24 / 60 / 60))
|
return qsTr("%n day(s) ago", "0", Math.floor(delta / 86400))
|
||||||
}
|
}
|
||||||
|
|
||||||
function netTypeToString(){
|
function netTypeToString(){
|
||||||
|
|
Loading…
Reference in a new issue