Skip to content

Commit

Permalink
Replace depredated OC.Util.*Date function with moment
Browse files Browse the repository at this point in the history
As per nextcloud/server#20988

Signed-off-by: Corentin Noël <corentin@elementary.io>
  • Loading branch information
Corentin Noël committed Nov 17, 2020
1 parent 5aa94b1 commit 8525811
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/activitymodel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
},

/**
Expand Down

0 comments on commit 8525811

Please sign in to comment.