• 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: Sun, 6 Sep 2009 16:44:38 +0200


Le 6 sept. 2009 à 16:11:39, Michelle Steiner a écrit :


On Sep 6, 2009, at 3:04 AM, Yvan KOENIG wrote:

So, it appears that English systems are able to decipher a date using the format dd/mm/yyyy

Nope, it doesn't, not American English systems; don't know about British English systems, though.

date "31/12/09"

Will not compile; the error dialog says
Syntax Error
Invalid date and time date 31/12/09.

It seems that you didn't read carefully ;-)

In 
De :   email@hidden
Objet : Rép : date/Snow Leopard changed
Date : 5 septembre 2009 17:24:32 HAEC
À :   email@hidden

was:

Le 5 sept. 2009 à 15:31:28, Doug Tallman a écrit :

For example, I get data files which have dates in the first line of text, in
a variety formats, along with some non-date information.

9/14/2009 Sports Highlights
Updates Sept. 14, 2009

So I have a handler that  coerces the first line of text to a date, and it
has worked so well that it's now in dozens, if not hundreds, of scripts.

set fileDateStamp to date paragraph 1 of myText

Bob,
It appears that this works:
set fileDateStamp to date (paragraph 1 of myText)

It'll be a pain to reformat all those scripts, but a lot simpler than a lot of text processing to figure out the date format.

doug

And what would be the result if the paragraph 1 is:

31/12/1943 Arpajon (Seine et Oise)

on your machine using the mm/dd/yyyy date format ?

Yvan KOENIG (VALLAURIS, France) samedi 5 septembre 2009 17:12:20

I got the response:

De :   email@hidden
Objet : Rép : date/Snow Leopard changed
Date : 5 septembre 2009 22:59:19 HAEC
À :   email@hidden


Le 5 sept. 2009 à 22:59:19, LuKreme a écrit :

On 5-Sep-2009, at 09:24, Yvan KOENIG wrote:

And what would be the result if the paragraph 1 is:

31/12/1943 Arpajon (Seine et Oise)

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"

Yvan KOENIG (VALLAURIS, France) samedi 5 septembre 2009 17:12:20

set myTest to "samedi 5 septembre 2009 17:12:20" as string
set myDate to date (myTest)
return myDate
—> error "Invalid date and time date samedi 5 septembre 2009 17:12:20 of «script»." number −30720

To which I responded:

Thanks.

I asked because on French system,

set mytest to "12/31/1943"
set myDate to date (mytest)

returns

error "Date et heure invalides date 12/31/1943 of «script»." number -30720

We already know that the date behaviour may change with the AM/PM setting.
But, my question clearly asked upon a precise setting.
I have no reason to guess that luKreme responded about an other setting than the one asked about.
Given its response, it seems clear that systems set to mm/dd/yyyy date format are able to decipher the dd/mm/yyyy format too.
Or luKreme response was odd but I have no reason to think that !

Of course, if luKreme's response was odd, 
we get an annoying but consistent behavior and my remark upon apartheid/segregation is wrong too 
but Mark J. Reed  was not 'firing' me upon the date's behavior but upon the used word.

At this time, I have 
one user (luKreme) writing that it's system set to mm/dd/yyyy is able to decipher dd/mm/yyyy
and
one user (Michelle Steiner) writing that it's system set to mm/dd/yyyy is unable to decipher dd/mm/yyyy

At least, it's a bit surprising !

Yvan KOENIG (VALLAURIS, France) dimanche 6 septembre 2009 16:44:31


 _______________________________________________
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

  • Follow-Ups:
    • Re: date/Snow Leopard changed
      • From: LuKreme <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: Yvan KOENIG <email@hidden>)
 >Re: date/Snow Leopard changed (From: Michelle Steiner <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