Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScript date/time data types



Judging from what I see in <AE/AERegistry.h>, it looks like, in
addition to the venerable typeLongDateTime data type, modern
AppleScript may support the following alternative representations
of dates:

    typeISO8601DateTime
    typeCFAbsoluteTime

(the latter was apparently introduced with Leopard).

This is a welcome addition for applications that internally
represent dates with CFAbsoluteTime, and may need to expose
dates with subsecond resolution, which was impossible with
LongDateTime.

Unfortunately, it looks like AppleScript, as of Mac OS X 10.5.1,
lacks built-in coercions between typeLongDateTime and typeCFAbsoluteTime,
whereas it does know how to convert between typeLongDateTime
and typeISO8601DateTime.  For example:

    ((current date) as «class isot») as string

yields:

    2007-11-21T16:06:31

I'm intrigued -- is this stuff documented anywhere?


                                        -- marco

--
It's not the data universe only, it's human conversation.
They want to turn it into a one-way flow that they have entirely
monetized. I look at the collective human mind as a kind of
ecosystem. They want to clear cut it. They want to go into the
rainforest of human thought and mow the thing down.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-implementors/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.