title: Compare two dates Google apps script
body: <p>What would be the best way to <strong>compare two dates</strong>? </p>
  
  <pre><code>var int = e.parameter.intlistbox;
  var startDate = rSheet.getRange(parseInt(int) + 1 ,1).getValues();
  // returns Sat Jun 30 2012 00:00:00 GMT-0300 (BRT) 
  var toDay = new Date();
  // Sat Jun 23 2012 22:24:56 GMT-0300 (BRT)
  
  if (startDate &gt; toDay){ ....
  </code></pre>
  
  <p>I saw the .toString() option but that seems to work only for == or === operator. </p>
  
  <p>Anything clear about this matter?</p>