i used to use this pkg for along time ago and by then there was no problems with moment stuff in it
but recently i just facing with this error in my terminal yelling mew about deprecation warnings like below( pm2 log in my terminal ):
0|myTmpProject | 2019-01-08 10:21: Deprecation warning: use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.
let _date = dateCreated.split('T')[0]
_date = moment(_date, 'YYYY-MM-DD').locale('fa').format('YYYY/MM/DD')
__date = _date.split('-')
_date = moment.updateLocale( 'fa', {
longDateFormat: {
L:'YYYY/MM/DD'
},
relativeTime: {
d: __date[2],
m: __date[1],
y: __date[0]
}
})
but no result i got yet...
it works but i'm worries about future as it warns me about deprecation stuff that goes on in moment js team.
any kinda response would be appreciated.