var date = new Date();
var dateTable = SpreadsheetApp.openById(ID).getRangeByName(check).getValues();
var twentyeihth = 28*60*60*24*1000;
function sendData() {
var spreadsheet = SpreadsheetApp.openById(ID);
var data = spreadsheet.getRangeByName(RANGE).getValues();
var message = {};
console.log(dateTable);
if (SpreadsheetApp.openById(ID).getRangeByName(check).getValues() < SpreadsheetApp.openById(ID).getRangeByName(check).getValues() - twentyeihth){ //condition
message.subject = text;
message.to = EMAIL;
message.htmlBody = dataToHtmlTable_(data) +
"<br><br>[Notification]";
MailApp.sendEmail(message);
}
}