Re: A few questions about dates
Re: A few questions about dates
- Subject: Re: A few questions about dates
- From: Mat <email@hidden>
- Date: Sat, 26 Aug 2006 20:39:18 -0400
http://developer.apple.com/documentation/applescript/Conceptual/AppleScriptLangGuide/AppleScript.2d.html
"
set theDate to current date --using scripting addition command
--result: date "Saturday, February 27, 1999 3:37:50 PM"
weekday of theDate --result: Saturday
day of theDate --result: 27
month of theDate --result: February
year of theDate --result: 1999
time of theDate --result: 56270 (seconds since 12:00:00 AM)
time string of theDate --result: "3:37:50 PM"
date string of theDate --result: "Saturday, February 27, 1999""
On 8/26/06, Sweth Chandramouli <
email@hidden> wrote:I've poured over Matt Neuburg's book and Googled, but can't find an answer
to any of these questions; any answers (or pointers to where I can find
out more) would be appreciated:
1) AS stores dates as seconds, but what's the reference that Applescript
measures those seconds against (
i.e. does AS use Unix-style "epoch"
seconds, or something else)?
2) Is there any way to return a date as its value in seconds, rather
than as a date string? Trying to coerce the value using "as integer"
returns a "Can't make date ... into type integer" error, and "as number"
behaves analogously.
3) What's the deal with "today"? It seems to be a synonym for "current
date" when used in comparisons, but doesn't seem to be valid anywhere
else.
TIA,
Sweth.
--
Sweth Chandramouli - http://EthicalHomes.com/
Planning on selling your house? Ask me about how thinking like a buyer can
help you get thousands more for your house AND put you in the best position
to buy your next home.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden