title: moment.js returns "Invalid date" for last day of March and August
body: <p>When I pass Year, Month, Day as strings into the moment.js date constructor to get the last day of the month, it returns "Invalid date" for March and August:</p>
  
  <pre class="lang-js prettyprint-override"><code>moment(["2022","0","31"]).toISOString()
  "2022-01-31T06:00:00.000Z"
  moment(["2022","1","28"]).toISOString()
  "2022-02-28T06:00:00.000Z"
  
  //March
  moment(["2022","2","31"]).toISOString()
  "Invalid date"
  
  moment(["2022","3","30"]).toISOString()
  "2022-04-30T05:00:00.000Z"
  moment(["2022","4","31"]).toISOString()
  "2022-05-31T05:00:00.000Z"
  moment(["2022","5","30"]).toISOString()
  "2022-06-30T05:00:00.000Z"
  moment(["2022","6","31"]).toISOString()
  "2022-07-31T05:00:00.000Z"
  
  //August
  moment(["2022","7","31"]).toISOString()
  "Invalid date"
  
  moment(["2022","8","30"]).toISOString()
  "2022-09-30T05:00:00.000Z"
  moment(["2022","9","31"]).toISOString()
  "2022-10-31T05:00:00.000Z"
  moment(["2022","10","30"]).toISOString()
  "2022-11-30T06:00:00.000Z"
  moment(["2022","11","31"]).toISOString()
  "2022-12-31T06:00:00.000Z"
  </code></pre>
  
  <p>However, when I specify an integer for the Month parameter, these dates work:</p>
  
  <pre class="lang-js prettyprint-override"><code>//March
  moment(["2022",2,"31"]).toISOString()
  "2022-03-31T05:00:00.000Z"
  
  //August
  moment(["2022",7,"31"]).toISOString()
  "2022-08-31T05:00:00.000Z"
  </code></pre>
  
  <p>I'm wondering why this happens when I pass the Month parameter as a string vs integer?</p>