title: How to compare two Moment.js Objects
body: <p>I have an Array with Moment.js objects in a variable:</p>
  
  <pre><code>var feriados = function addFeriados(){
              feriados = [];
              ...
              feriados.push(moment("2016-01-01"));
              feriados.push(moment("2016-02-08"));
              feriados.push(moment("2016-02-09"));
              feriados.push(moment("2016-03-25"));
              feriados.push(moment("2016-04-21"));
              feriados.push(moment("2016-05-01"));
              feriados.push(moment("2016-05-26"));
              feriados.push(moment("2016-09-07"));
              feriados.push(moment("2016-10-12"));
              feriados.push(moment("2016-11-02"));
              feriados.push(moment("2016-11-15"));
              feriados.push(moment("2016-12-25"));
              ...
              return feriados;
   } 
  </code></pre>
  
  <p>And a function to determinate if a value is in this array:</p>
  
  <pre><code>function checkFeriado(data) {
      var i;
      for (i = 0; i &lt; allFeriados.length; i++) {
          if (allFeriados[i] == data) {
          return true;
          }
      }
      return false;
  }
  </code></pre>
  
  <p>But even if i pass a <code>moment</code> object, as <code>checkFeriado(moment("2016-01-01"));</code> i'm getting false. Whats wrong with my code? Is there a best way to do this?</p>
  
  <p>Entire project have jQuery and Moment.js</p>