Moment.js - two dates difference in number of days
<p>I get incorrect results when trying to find numeric difference between two dates:</p>

<pre><code>var startDate = moment( $('[name="date-start"]').val(), "DD.MM.YYYY"), // $('[name="date-start"]').val() === "13.04.2016"
endDate       = moment( $('[name="date-end"]'  ).val(), "DD.MM.YYYY"); // $('[name="date-end"]').val() === "28.04.2016"

var diff = startDate.diff(endDate);

console.log( moment(diff).format('E') );
</code></pre>

<p>Between <code>13.04.2016</code> and <code>28.04.2016</code> I shouldn't get that difference is <strong>3</strong> or <strong>2</strong> days...</p>

<p>I've tried to multiple combinations:</p>

<ul>
<li>swap <code>startDate.diff(endDate)</code> with <code>endDate.diff(startDate)</code></li>
<li><code>format('E')</code> with something I've come up searching the SO</li>
</ul>

<p>result: all the time I get that difference is 3 or 2 days.</p>

<p>What am I doing wrong? Thanks in advance.</p>