• 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 17:39:47 +0200


Le 6 sept. 2009 à 17:23:43, Jon Pugh a écrit :

At 7:27 AM -0400 9/6/09, Mark J. Reed wrote:
Can you construct an arbitrary date in one step without parsing a
string? "make new date with properties {year: y, month: m, day: d}"
maybe?

on newDate(m, d, y)
set new_date to current date
set month of new_date to m
set day of new_date to d
set year of new_date to y
set time of new_date to 0
return new_date
end newDate

newDate(12, 25, 1973)



This was definitely not the problem.

Any user may receive 
documents embedding dd/mm/yyyy dates
documents embedding mm/dd/yyyy dates
documents embedding yyyy/mm/dd dates

I thought that given its system settings, AppleScript is able to decipher only one set of them.
luKreme's message make me think that I was wrong as he stated that with a system set to mm/dd/yyyy AppleScript was able to decipher 31/12/1943 which is clearly a dd/mm/yyyy date.

Like all of us here, I am able to extract "by hand" the day, the month and the year of the three formats.
I wonder why there is no tool allowing to ask AppleScript to do the job with something like

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")

Yvan KOENIG (VALLAURIS, France) dimanche 6 septembre 2009 17:39:40


 _______________________________________________
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: Yvan KOENIG <email@hidden>)
 >Re: date/Snow Leopard changed (From: "Mark J. Reed" <email@hidden>)
 >Re: date/Snow Leopard changed (From: Jon Pugh <email@hidden>)

  • Prev by Date: Re: Safari, make new document only if none open ?
  • 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