• 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 pickers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Date pickers


  • Subject: Re: Date pickers
  • From: Robert DuToit <email@hidden>
  • Date: Tue, 9 Feb 2010 09:03:35 -0500

On Feb 9, 2010, at 8:54 AM, Robert DuToit wrote:

> Pretty cool.
>
> So a quick AS date to ASOC date would be:
>
> set theNSdate to current application's class "NSDate"'s |date|()
>
> set myFormatter to current application's class "NSDateFormatter"'s alloc()'s init()
> myFormatter's setDateFormat_("yyyy-MM-dd H:m:s")
> set theDateString to (myFormatter's stringFromDate_(theNSdate))
>
> do shell script "echo " & quoted form of (theDateString as text) & "| xxd -u -p"
> set theDate to (run script "get «data isot" & (text 1 thru -3 of the result) & "»") as date
> log (theDate as string)
>
> However I suppose this is not international proof. But still nice.

Actually it does seem to work in different locale/formats.

R


>
> Rob _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> applescriptobjc-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Date pickers (From: red_menace <email@hidden>)
 >Re: Date pickers (From: Robert DuToit <email@hidden>)

  • Prev by Date: Re: Date pickers
  • Next by Date: Re: Date pickers
  • Previous by thread: Re: Date pickers
  • Next by thread: Re: Date pickers
  • Index(es):
    • Date
    • Thread