In article
,
Jo_y wrote:
> tell (current date) to set {yr, mo, dy, hr, mn, sc} to {year, its
> month, day, its hours, its minutes, its seconds}
This is the best way to do it because it works regardless of the date
format. Taking parts of a string can fail if your script is used in
another country. You can also append "as number" or "as text" to the
month so you get the desired numeric or text value, e.g.:
tell (current date) to set {yr, mo, dy, hr, mn, sc} to {its year, its
month as number, day, its hours, its minutes, its seconds}
You can also get the day of the week using "its weekday" -- and this
too can be "as number" or "as text.", e.g.:
tell (current date) to set {yr, mo, dy, hr, mn, sc, wd} to {its year,
its month, day, its hours, its minutes, its seconds, its weekday}
--
Jerry Kindall, Seattle, WA <http://www.jerrykindall.com/>
Send only plain text messages under 32K to the Reply-To address.
This mailbox is filtered aggressively to thwart spam and viruses.
>> Stay informed about: new word 2008 applescript questions