diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-02 14:11:46 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-02 14:11:46 +0200 |
commit | 594a3e4e22223389a306acad4e3921027decad96 (patch) | |
tree | 2f01ea64c8f09fc87448648e3a5def8c6fbec399 /core/js | |
parent | 4fb2ef3bacf2ae8eeac0b5bebecd98b90cca5511 (diff) | |
parent | 4b3a5a257f0861db23b8d97836afdf398b3fef9a (diff) | |
download | nextcloud-server-594a3e4e22223389a306acad4e3921027decad96.tar.gz nextcloud-server-594a3e4e22223389a306acad4e3921027decad96.zip |
Merge pull request #19523 from owncloud/fix-seconds-ago
Fix moment.js "a few seconds ago" with "seconds ago"
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/js.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js index e40141ac617..36fa90e78a3 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1533,6 +1533,10 @@ OC.Util = { * @returns {string} human readable difference from now */ relativeModifiedDate: function (timestamp) { + var diff = moment().diff(moment(timestamp)); + if (diff >= 0 && diff < 45000 ) { + return t('core', 'seconds ago'); + } return moment(timestamp).fromNow(); }, /** |