Chapter 9. Working with Dates

Dates play an essential part in everyday life—imagine a world without dates! You'd never know if you were on time, and you'd miss out on all kinds of important events, even your birthday! As you might expect, dates are also important in programming. Think of how dates come into play in the applications you use every day—your operating system, your e-mail client, a lot of the web sites you regularly visit, and so on.

In this chapter, you'll learn how to use dates in AppleScript. As you're about to find out, the date class in AppleScript is versatile and has many hidden aspects that are worth exploring. I'll cover working with dates, using date objects' properties, and performing simple and complex date operations.

Get Learn AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.