Google Apps Script: comparing dates
<p>I'm having a weird issue comparing dates in my Google Apps Script.</p>

<p>For this, my sheet has a date in cell.getValue() so on the </p>

<pre><code>e.range.setNote(cell.getValue() + " --- " + startDate);
</code></pre>

<p>line, the note shows two dates that appear identical, but they aren't because the following if statement is not satisfied. Am I missing something here with the comparisons? Thanks.</p>

<pre><code>function onEdit(e) {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sss = ss.getSheetByName("Sheet1");

  var row = e.range.getRow();
  var startDate = sss.getRange(row, 3).getValue(); //Wed Aug 10 2016 00:00:00 GMT-0600 (GALT)

  var cell = ss.getSheetByName("Sheet2").getRange(1, 1);
  e.range.setNote(cell.getValue() + " --- " + startDate); //Wed Aug 10 2016 00:00:00 GMT-0600 (GALT) --- Wed Aug 10 2016 00:00:00 GMT-0600 (GALT)

  if (cell.getValue() === startDate){
      cell.setBackground('blue');
    }  

}
</code></pre>