title: Using _i with moment js is not working when using it in with if condition
body: <p>I am using <code>_i</code> in momentjs with if condition but it is not giving expected output.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>var output = "07-14-2017";
  var selectedDates = "06-15-2018";
  
  if(moment(output)._i &lt;= moment(selectedDates)._i)
  {
    console.log(output date is less than or equal selected date);
  }
  else
  {
    console.log(output date is greater than selected date);
  }
  </code></pre>
  
  <p>Here my output date is of 2017 and <code>selecteddates</code> is of 2018, still it is giving me an output of 'output date is greater than selected date'. It should give me an output 'output date is less than or equal selected date'.</p>
  
  <p>I have given all jQuery and momentjs files references properly.</p>