Date formatting functions in AppleScript