Created
September 29, 2016 15:41
-
-
Save MappingKat/c8e088f5ddeaaf8625854431162ccb0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loopThrough(records){ | |
var myDateString = Utilities.formatDate(new Date(),"GMT", "yyyy-MM-dd"); | |
for (var i = 0; i < records.length; i++) { | |
var formattedDate = records[i].updated_at.substr(0, 10); | |
var now = new Date(); | |
if (formattedDate === myDateString) { | |
now.setDate(now.getDate() + 30); | |
var stringDate = Utilities.formatDate(now,"GMT", "yyyy-MM-dd"); | |
updateDate(records[i].id, stringDate); | |
} | |
if (records[i]["form_values"]["8302"] === myDateString){ | |
updateStatus(records[i].id); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment