Skip to content

Instantly share code, notes, and snippets.

View wooandy's full-sized avatar

Andy Woo wooandy

View GitHub Profile
-- The following Applescript contains code from John Gruber's Rename Active Document (https://daringfireball.net/2004/10/rename_active_document)
on getTimeInHoursAndMinutes()
-- Get the "hour"
set timeStr to time string of (current date)
set Pos to offset of ":" in timeStr
set theHour to characters 1 thru (Pos - 1) of timeStr as string
set timeStr to characters (Pos + 1) through end of timeStr as string