Re: Date pickers
Re: Date pickers
- Subject: Re: Date pickers
- From: Deivy Petrescu <email@hidden>
- Date: Wed, 10 Mar 2010 17:29:30 -0500
On 10/03/2010, at 17:12 , Shane Stanley wrote:
> On 11/3/10 2:40 AM, "Deivy Petrescu" <email@hidden> wrote:
>
>> how do I get the weekday of a date
>
> In case you didn't get there already:
>
> -- get current calendar
> set theCal to current application's NSCalendar's currentCalendar()
> -- use the calendar to get the components from the date
> set theComponents to theCal's components_fromDate_(current application's
> NSWeekdayCalendarUnit, zdate)
> log |weekday| of theComponents
>
>
Actually I get an integer using the method above.
What I did was, I used formaters.
The following returns the whole date:
setDateFormat_("EEEEE dd/MM/yyyy") ---> Wednesday 10/03/2010
there is my Weekday!
Depending n the numbers of E's you get a different output.
And E means Sunday as day 1 and e Monday as day 1.
>> (I thought it was description())
>
> If it's a property, you can leave off the trailing parens. I tend to put
> them in so I can tell at a glance that it's a call, not a variable. There's
> not a lot of formatting color in ASObjC code...
>
I'd say there is not a lot of a lot of things in ASOC....
:)
> --
> Shane Stanley <email@hidden>
> AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>
Deivy Petrescu
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