Skip to content

Instantly share code, notes, and snippets.

@tylermumford
Created February 4, 2013 19:49
Show Gist options
  • Save tylermumford/4709114 to your computer and use it in GitHub Desktop.
Save tylermumford/4709114 to your computer and use it in GitHub Desktop.
Pushes the start date of selected tasks back until the next Friday. If "today" is Friday, pushes until next Monday.
set d to current date
if d's weekday is Friday then
set d to d + 3 * days
else
repeat until d's weekday is Friday
set d to d + 1 * days
end repeat
end if
set d to date "12:00 AM" relative to d
tell application "The Hit List"
get selection
repeat with eachTask in result
set start date of eachTask to d
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment