Created
January 21, 2013 03:22
-
-
Save benwaldie/4583398 to your computer and use it in GitHub Desktop.
TUAW > TextExpander Date Snippets > Current Week
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
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