summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-05-15 08:42:55 +0200
committernpmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>2020-05-15 17:46:57 +0000
commitd5a13f8c4ad9cdc5f935b4826c5de9d0a2a8d2ec (patch)
treeb782605efcf4e7bbc12409d14e7eb42e7d536a0e /core/src
parentf80f2a22d702efacaf7226f5ee60d76d6b637061 (diff)
downloadnextcloud-server-d5a13f8c4ad9cdc5f935b4826c5de9d0a2a8d2ec.tar.gz
nextcloud-server-d5a13f8c4ad9cdc5f935b4826c5de9d0a2a8d2ec.zip
Deprectae OC.Util.formatDate and OC.Util.relativeModifiedDate
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/OC/util.js2
1 files changed, 2 insertions, 0 deletions
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')