title: moment js add function is not working
body: <p>Literally, moment().add() is not working in my js code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var theDate = moment(event.start.format("YYYY-MM-DD HH:mm")); //start Date of event 
  var checkquarter = theDate.add(30, 'minutes');
  var plus = 30;
  if (userDuration == '45') {
    plus = 45;
  }
  for (var i = 0; i &lt; excludedList.length; i++) {
  
    var excludedTomorrow = moment(excludedList[i]["excludedDate"]).format("YYYY-MM-DD HH:mm"); //start Date of event that should be excluded
  
    var endtime = moment(excludedTomorrow).add(plus, 'minutes'); //endTime of event that should be excluded
    if (excludedList[i]["id"] == 'aaa@gmail.com') {
      console.log(endtime);
      console.log(plus);
      console.log(theDate);
      console.log(checkquarter);
  
    }
    //var endtimeForCompare = moment(endtime);
    if (theDate &gt;= excludedTomorrow &amp;&amp; theDate &lt; endtime &amp;&amp; Id == excludedList[i]["id"]) {
  
      return false;
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src='https://momentjs.com/downloads/moment.js'&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>In this code, I used moment add twice. First is checkquarter, which is added 30 minutes to theDate variable. Second is endtime, which is added plus minutes to excludedTomorrow, which I get from my DB. </p>
  
  <p>Here is the console
  <a href="https://i.stack.imgur.com/yW1x8.png" rel="nofollow noreferrer">console response</a>
  if you see this image, it shows the endtime, plus, theDate, checkquarter variable in order. However, as you see, nothing is added to them. </p>
  
  <p>My script for momentJS is,</p>
  
  <pre><code>&lt;script src='https://momentjs.com/downloads/moment.js'&gt;&lt;/script&gt;
  </code></pre>