diff --git a/js/activitymodel.js b/js/activitymodel.js index 45dd7f772..cb8420879 100644 --- a/js/activitymodel.js +++ b/js/activitymodel.js @@ -1 +1 @@ -!function(){var t=OC.Backbone.Model.extend({getUnixMilliseconds:function(){return _.isUndefined(this.unixMilliseconds)&&(this.unixMilliseconds=moment(this.get("datetime")).valueOf()),this.unixMilliseconds},getRelativeDate:function(){return OC.Util.relativeModifiedDate(this.getUnixMilliseconds())},getFullDate:function(){return OC.Util.formatDate(this.getUnixMilliseconds())},isMonochromeIcon:function(){return"file_created"!==this.get("type")&&"file_deleted"!==this.get("type")&&"favorite"!==this.get("type")}});OCA.Activity=OCA.Activity||{},OCA.Activity.ActivityModel=t}(); \ No newline at end of file +!function(){var t=OC.Backbone.Model.extend({getUnixMilliseconds:function(){return _.isUndefined(this.unixMilliseconds)&&(this.unixMilliseconds=moment(this.get("datetime")).valueOf()),this.unixMilliseconds},getRelativeDate:function(){return moment(this.getUnixMilliseconds()).fromNow()},getFullDate:function(){return moment(this.getUnixMilliseconds()).format("LLL")},isMonochromeIcon:function(){return"file_created"!==this.get("type")&&"file_deleted"!==this.get("type")&&"favorite"!==this.get("type")}});OCA.Activity=OCA.Activity||{},OCA.Activity.ActivityModel=t}(); \ No newline at end of file diff --git a/src/legacy_scripts/activitymodel.js b/src/legacy_scripts/activitymodel.js index d33238492..ebec1ac46 100644 --- a/src/legacy_scripts/activitymodel.js +++ b/src/legacy_scripts/activitymodel.js @@ -32,14 +32,14 @@ * @returns string E.g. "seconds ago" */ getRelativeDate: function () { - return OC.Util.relativeModifiedDate(this.getUnixMilliseconds()); + return moment(this.getUnixMilliseconds()).fromNow(); }, /** * @returns string E.g. "April 26, 2016 10:53 AM" */ getFullDate: function () { - return OC.Util.formatDate(this.getUnixMilliseconds()); + return moment(this.getUnixMilliseconds()).format('LLL'); }, /**