From bf4ce867e4aba628222bd4a2997613fbfe7ab08b Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 15 May 2020 08:42:55 +0200 Subject: [PATCH] Deprectae OC.Util.formatDate and OC.Util.relativeModifiedDate Signed-off-by: Roeland Jago Douma --- core/src/OC/util.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/OC/util.js b/core/src/OC/util.js index f8f7c05e6e8cb..2e8c7e0fbefab 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') 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') const diff = moment().diff(moment(timestamp)) if (diff >= 0 && diff < 45000) { return t('core', 'seconds ago')