Hi! I’m using a database with a javascript Date() value and when I use it in moment with this code:
<p id="relativetime"></p>
<script>
$("#relativetime").text(moment("Sun Aug 30 2020 15:58:59 GMT+0000 (Coordinated Universal Time)").fromNow());
</script>
I get this warning:
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to Moment.js | Guides for more info.
How do I convert it or whatever so it won’t work in the future?