B.6. Dates

This section summarizes the properties and classes for the date class.

B.6.1. Date Class Properties

The following table lists classes you use like properties when working with dates. The first five properties can be assigned values.

ClassDescription
weekdayday of the week (with the value Sunday, Monday, ... Saturday)
monthmonth of the year (with the value January, February, ... December)
dayday of the month (1 – 31)
yearFour-digit year number
timeinteger time in seconds since midnight
date stringstring in the format "Weekday, Month day, year" or a different format depending on the International settings in System Preferences
time stringstring in the format "hh:mm:ss AM or PM" or a different format depending on the 24-hour clock and Region settings in System Preferences
short date stringstring in the format "mm/dd/yyyy" or a different format depending on the International settings in System Preferences

B.6.2. Predefined Properties for Working with Dates

The following predefined properties can be used when you work with dates. You can changes these val¬ues, but I don't recommend doing so.

PropertyValue
minutes60
hours3600
days86400
weeks604800

Get Beginning AppleScript® 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.