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.
Class | Description |
---|---|
weekday | day of the week (with the value Sunday, Monday, ... Saturday) |
month | month of the year (with the value January, February, ... December) |
day | day of the month (1 – 31) |
year | Four-digit year number |
time | integer time in seconds since midnight |
date string | string in the format "Weekday, Month day, year" or a different format depending on the International settings in System Preferences |
time string | string 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 string | string 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.
Property | Value |
---|---|
minutes | 60 |
hours | 3600 |
days | 86400 |
weeks | 604800 |
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.