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 authored and artonge committed Jun 27, 2023
1 parent b0f5e57 commit 641ca17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/activitymodel.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/legacy_scripts/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 641ca17

Please sign in to comment.