summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-02 14:11:46 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-02 14:11:46 +0200
commit594a3e4e22223389a306acad4e3921027decad96 (patch)
tree2f01ea64c8f09fc87448648e3a5def8c6fbec399 /core/js
parent4fb2ef3bacf2ae8eeac0b5bebecd98b90cca5511 (diff)
parent4b3a5a257f0861db23b8d97836afdf398b3fef9a (diff)
downloadnextcloud-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.js4
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();
},
/**