Skip to content

Instantly share code, notes, and snippets.

@benwaldie
Created January 21, 2013 03:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benwaldie/4583398 to your computer and use it in GitHub Desktop.
Save benwaldie/4583398 to your computer and use it in GitHub Desktop.
TUAW > TextExpander Date Snippets > Current Week
set theDate to (current date)
set theStartDate to theDate
repeat until weekday of theStartDate = Sunday
set theStartDate to theStartDate - 1 * days
end repeat
set theEndDate to theDate
repeat until weekday of theEndDate = Saturday
set theEndDate to theEndDate + 1 * days
end repeat
set theDate to (short date string of theStartDate) & " - " & (short date string of theEndDate)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment