From d5a13f8c4ad9cdc5f935b4826c5de9d0a2a8d2ec Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 15 May 2020 08:42:55 +0200 Subject: Deprectae OC.Util.formatDate and OC.Util.relativeModifiedDate Signed-off-by: Roeland Jago Douma Signed-off-by: npmbuildbot[bot] --- core/src/OC/util.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/src') diff --git a/core/src/OC/util.js b/core/src/OC/util.js index f8f7c05e6e8..67f00bf30d3 100644 --- a/core/src/OC/util.js +++ b/core/src/OC/util.js @@ -114,6 +114,7 @@ export default { * @returns {string} timestamp formatted as requested */ formatDate: function(timestamp, format) { + console.warn('OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment') format = format || 'LLL' return moment(timestamp).format(format) }, @@ -123,6 +124,7 @@ export default { * @returns {string} human readable difference from now */ relativeModifiedDate: function(timestamp) { + console.warn('OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment') const diff = moment().diff(moment(timestamp)) if (diff >= 0 && diff < 45000) { return t('core', 'seconds ago') -- cgit v1.2.3