function unupdatedRows() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var formSheet = ss.getSheets()[0];
var numRows = formSheet.getLastRow();
var lastRow = formSheet.getRange(numRows,1);
var lastDate = lastRow.getValue();
Logger.log(lastUpdate());
Logger.log(lastDate);
if (lastDate == lastUpdate()){
Logger.log("MATCH! Sheet is up to date");
}
};
Logger output:
[14-06-24 16:12:53:188 EDT] Mon Jun 23 01:50:10 GMT-04:00 2014
[14-06-24 16:12:53:188 EDT] Mon Jun 23 01:50:10 GMT-04:00 2014
我應該在記錄器中看到「MATCH!Sheet is up to date」。爲什麼if語句不被滿足?值如果不符合則匹配:S
lastUpdate()從哪裏來? –