Merge pull request #4113

7d2f2ca Utils.js simplify ago func (backfire-monism-net)
This commit is contained in:
luigi1111 2023-02-15 10:53:13 -05:00
commit bdd91b053d
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -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(){