Is there a way to get the current date with an AppleScript Handler, returning the current date, the current time, or both? For my purposes, I only want to return the current date.
Current date is a command in the standard additions OSAX.
It's fairly flexible, and can give you date and time information in a variety of formats. Below are a few examples of how it works. Date string and Time String use the format set by the user in the international preferences.
{dateInfo(), GetDate(), GetTime()} on dateInfo() return {day, month, year, time, date string, time string, hours, minutes, seconds} of (current date) end dateInfo on GetDate() return date string of (current date) end GetDate
on GetTime() return time string of (current date) end GetTime =
|