hello, can someone please be a lifesaver and help me troubleshoot the below code?
for some reason, the code below returns Sunday instead of Monday week start date
/* return start of the week (Monday) based on current date */
var curr = new Date();
var first = (curr.getDate() - curr.getDay()) ;
var Monday = Utilities.formatDate(new Date(curr.setDate(first)), "UTC", "YYYY-MM-dd");
var sh = SpreadsheetApp.getActiveSheet();
sh.getRange("A3").setValue(Monday) ;
};