moment.js Invalid date when formatting a date
<p>I am trying to format the date that is coming from a server, but I am getting an error that date is not valid.</p>

<pre><code>moment("2016-11-31T18:00:00.000+02:00").format('YYYY-MM-DD'); // Invalid date
</code></pre>

<p>EDIT: I've checked and if the day is 30 not 31 it works, jsfiddle updated</p>

<p><a href="https://jsfiddle.net/FLhpq/7093/" rel="nofollow noreferrer">jsfiddle</a></p>