title: Getting 2020-02-29T00:00:00.000Z for March using momentjs or Date()
body: <p>I'm trying to get start and end of the current month but for march it is giving me the start date as 
  2020-02-29T00:00:00.000Z</p>
  
  <p>Using momentjs</p>
  
  <pre><code>    var firstDay = new moment().startOf('month').utcOffset(0);
      firstDay.set({hour:0,minute:0,second:0,millisecond:0});
      var lastDay = new moment().endOf('month').utcOffset(0);
      lastDay.set({hour:23,minute:59,second:59,millisecond:0})
  </code></pre>
  
  <p>Using Date()</p>
  
  <pre><code>    var date = new Date(),
          y = date.getFullYear(),
          m = date.getMonth();
      var firstDay = new Date(y, m, 1);
      var lastDay = new Date(y, m + 1, 1);
  </code></pre>
  
  <p>How to solve this?</p>