momentjs toDate() date return not same as format() date
<p>I am using <code>moment 2.16.0</code> and want starting days of month. There are different result of <code>toDate()</code> and <code>format()</code> method. Here is <a href="https://jsfiddle.net/evzcz58x/" rel="nofollow noreferrer">jsfiddle</a>.</p>

<p>code:-</p>

<pre><code>var time=moment().subtract(0,'months').startOf("month").format();
console.log(time); //2016-12-01T00:00:00+05:30

var time2=moment().subtract(0, 'months').endOf("month").format();
console.log(time2); //2016-12-31T23:59:59+05:30

var time=moment().subtract(0,'months').startOf("month").toISOString();
console.log(time); //2016-11-30T18:30:00.000Z  here i want somethings like 2016-12-01T00:00:00.000Z


var time2=moment().subtract(0, 'months').endOf("month").toISOString();
console.log(time2); // 2016-12-31T18:29:59.999Z here i want somethings like 2016-12-31T59:59:59.000Z
</code></pre>