javascript - Deprecation warning: moment construction falls back to js Date -
I use the following code to convert server-side date-time to local time using Moment.js The moment (moment) (moment ('Mercury, 23 April 2014 09:54:51 +0000'). Format ('LL')) .nan ()
But I'm getting It seems that I can not get rid of it !! Thanks in advance. / div> To get rid of the warning, you either need the following: In an ISO-formatted version of your date string: Now you have to pass in the string, but tell the moment how the format of the string is: Convert your string to a JavaScript date object and then pass it to the prompt: "Refraction Warning: The moment creation JS falls back on the date, it is frustrated and will be removed in the upcoming major release. For more information, please visit https://github.com View / moment / moment / issues / 1407 "!
How can I fix this ??
moment ('2014-04-23T0 9: 54: 51');
the moment (' Mercury, 23 April 2014 09:54:51 +0000 ',' ddd, DD MMM YYYH H: mm: SS Z '); D
Moment (new date ( "Mercury 23 last resort warning console with a built-in fallback which supports the moment now, like they say they will not support the fallback in future releases. they explain that
new date ('My date') is very unpredictable . < / Div>
Comments
Post a Comment