Re: xCalendar
dazroo <[email protected]>
| Newsgroups | gmane.comp.windows.gui4cli |
|---|---|
| Message-ID | <[email protected]> |
On 23/07/10 15:31, Marianne wrote:
>
>
> All users
>
> I need help with the above mentioned control.
>
> With the time internal variable it is possible to get the day of a week
> that is $$time.wkday. My question is how can I get the day of the week
> when a person clicked on the xCalendar control.
>
> There are internal variables such as $$calendar.current.month day or year.
>
> Is there a work around.
>
> Regards.
>
> Frans
>
Hi Frans,
In the absence of anything better, I'd get the weekday by converting
the date returned to Julian, then take its modulo 7 ($jday % 7).
Like this:
wd0 = 'Monday'
wd1 = 'Tuesday'
wd2 = 'Wednesday'
wd3 = 'Thursday'
wd4 = 'Friday'
wd5 = 'Saturday'
wd6 = 'Sunday'
date = "23/7/2010" // <-- e.g. from xCalendar
Extract date JULIAN jday
wday = $($jday % 7)
say ' date = $date : weekday = $wday ($wd$wday)'
// date = 23/7/2010 : weekday = 4 (Friday)
Hope that helps,
Dave
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/gui4cli/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/gui4cli/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/