• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: date/Snow Leopard changed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date/Snow Leopard changed


  • Subject: Re: date/Snow Leopard changed
  • From: Yvan KOENIG <email@hidden>
  • Date: Mon, 7 Sep 2009 10:27:28 +0200



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?

here it is deciphered as mardi 5 juin 2007 00:00:00
when it is deciphered as 
6 april 2007 on an English system.

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"

This old function is available in several spreadsheets.

And in every computer running Hypertalk it would get the correct date  (today's date in this example)
Note also that if I had this to be run by an user, I can force the user to give me any date as date item

set item_1_of_date_Item to text returned  of display dialog "enter year ....

We should not have this kinds of long threads because we can not agree on time.
I said that Bob Poland's computer had a problem... I had a problem I forgot am/pm since I don't use it.
So, I am all for a dateitems  that is locale independent.   A timeItems iwould be better but we can use date string since it always return am/pm.
But the whole idea is to have a locale independent way of sharing dates.

By the way I'd prefer a dateItems without weekday.

It does not hurt to ask... :)

But the original questions where not this one.

(1) Why is this script behaving this way
set myTest to "31/12/1943 Arpajon (Seine et Oise)" as string
set myDate to date (myTest)
return myDate
 —> date "Friday, 31 December 1943 00:00:00"

on a system supposed to use the setting mm/dd/yyyy

(2) why is the code:

set wakeTime to "6:01"
set WakeUpTime to short date string of (current date)
set WakeUpTime to date (WakeUpTime & space & wakeTime)
display dialog (time of WakeUpTime) as text

returning 00 on Robert's machine
and returning 21660 on mine ?

(3) is it foolish to ask for this kind of tool:


localizeDate("12/31/1943","US") 
or 
localizeDate("1943/12/31","IEEE")

or
localizeDate("11 september 2001","English")
localizeDate("12/31/1943","English")
localizeDate("14 juillet 1789","French")
localizeDate("14/07/1789","French")
localizeDate("1943/12/31","IEEE")

or the alternate Ed's proposal:

date someStringwithAdate using {region: "United States", calendar: "Gregorian")

I assume that I am not the unique user receiving documents containing dates from different countries.

Yvan KOENIG (VALLAURIS, France) lundi 7 septembre 2009 10:27:02
 _______________________________________________
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

References: 
 >Re: date/Snow Leopard changed (From: Doug Tallman <email@hidden>)
 >Re: date/Snow Leopard changed (From: Yvan KOENIG <email@hidden>)
 >Re: date/Snow Leopard changed (From: LuKreme <email@hidden>)
 >Re: date/Snow Leopard changed (From: Deivy Marck Petrescu <email@hidden>)
 >Re: date/Snow Leopard changed (From: Christopher Nebel <email@hidden>)
 >Re: date/Snow Leopard changed (From: Deivy Marck Petrescu <email@hidden>)

  • Prev by Date: Re: date/Snow Leopard changed
  • Next by Date: Re: date/Snow Leopard changed
  • Previous by thread: Re: date/Snow Leopard changed
  • Next by thread: Re: date/Snow Leopard changed
  • Index(es):
    • Date
    • Thread