Re: date/Snow Leopard changed
Re: date/Snow Leopard changed
- Subject: Re: date/Snow Leopard changed
- From: email@hidden
- Date: Mon, 7 Sep 2009 13:32:12 +1200
I'm with Chris N, I'm failing to see the issue here.
If you're receiving a block of text which is actually a date, say from an external file, you should know the format so be able to parse it appropriately.
If you want to set a date constant in a script—which is i18n safe—you can use this:
set TestDate to current date
set year of TestDate to 2000
set month of TestDate to 1
set day of TestDate to 2
set hours of TestDate to 3
set minutes of TestDate to 4
set seconds of TestDate to 5
More longwinded than the Hypertalk example but should get the job done?
(Pardon any formatting, testing web-based Gmail.)
Cheers
2009/9/7 Deivy Marck Petrescu
<email@hidden>
Chris,
I am missing something... the dateItems à la HyperCard.
As you say at the end of your letter
"For example, on my US system, "9/4/2009", "9-4-2009", and "9 4 2009" all evaluate to September 4, 2009."
"on my US system" being the key.
AS is international and Apple sells computer all over the world. I am impressed as the effort put forward by Apple to accommodate everyone.
But when it comes to date in AS, I still have to guess as to what is the locale we are working with.
Which by the way generated a flood of emails because everyone uses his/hers date.
So if I set
property dt: date "05/06/07"
How is that going to be interpreted in Yvan's computer? What about Axel's?
How about mine, that uses the American date but uses the 24 hour clock?
In Hypertalk we could (I forgot Hypertalk, so don't take me literally)
property dt: dateItems "2009,09,06,1,19,48,24"
And in every computer running Hypertalk it would get the correct date (today's date in this example)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden