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
-- Blog Post: https://ajot.me/finding-the-current-weeks-start-and-end-dates-in-applescript/ | |
-- Get the current date | |
set currentDate to current date | |
-- Get the current day of the week as a number (Sunday is 1, Monday is 2, etc.) | |
set currentDay to weekday of currentDate as integer | |
-- Calculate the date of the beginning of the week (Monday) | |
-- We use "currentDay - 2" because in AppleScript, Monday is represented by 2. |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 onEdit() { | |
Logger.log("Starting"); | |
var email = Session.getEffectiveUser().getEmail(); | |
Logger.log(email); | |
// Getting the Current Spreadsheet | |
var s = SpreadsheetApp.getActiveSheet(); | |
var r = s.getActiveCell(); //Getting the active cell | |
if( r.getColumn() != 2 ) { //checks the column |
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 onEdit() { | |
Logger.log("Starting"); | |
var email = Session.getEffectiveUser().getEmail(); | |
Logger.log(email); | |
var s = SpreadsheetApp.getActiveSheet(); | |
var r = s.getActiveCell(); | |
if( r.getColumn() != 2 ) { //checks the column | |
if( r.getRow() != 1 ) { | |
var row = r.getRow(); |
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
/*This is a test again*/ | |
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
/*This is a test*/ | |