title: How to add a month to a date accounting for a leap year and different number of days in Google script
body: <p>I am trying to add exactly one month to a date using Google script. This is what I have so far, which works fine up to a point;</p>
  <pre><code>var everyNth  = sheet.getRange(2,2).getValue();               // cell which contains the date
                  everyNth.setMonth(everyNth.getMonth() + 1);   // adds 1 month to the date
  </code></pre>
  <p>If date value is 5/25/2020 the above returns 6/25/2020 which is as intended<br />
  If date value is 2/29/2020 the above returns 3/29/2020 which is NOT as intended</p>
  <p>I need it to return 3/31/2020, which is exactly one month after, same if the month has 30 or 31 days.</p>