diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-10-02 10:16:21 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-10-02 10:51:51 +0200 |
commit | 4b3a5a257f0861db23b8d97836afdf398b3fef9a (patch) | |
tree | 0b0274cae73c0b90c604c705cb547c6d50d0ff17 /core/js/js.js | |
parent | 3dec30d0e09128002f24f58b7ea042c42defce31 (diff) | |
download | nextcloud-server-4b3a5a257f0861db23b8d97836afdf398b3fef9a.tar.gz nextcloud-server-4b3a5a257f0861db23b8d97836afdf398b3fef9a.zip |
Fix moment.js "a few seconds ago" with "seconds ago"
* fixes #18627
Diffstat (limited to 'core/js/js.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(); }, /** |