True, for most regional settings, but some do not show the Day. I just happened to be 
experimenting with setting my system to French Canadian. The long date there gets me

put the long date
-- "18 f�vrier, 2003"

Which is why I asked. What would be nice would be if the system would give me a 
day-of-the-week, in the proper language (and calendar). Not even Flash will do that.  
How about:

put (the systemDate).Mayan.dayOfTheWeek

-Phil
(I haven't tested this extensively, but Win98 gets me that French Canadian output)

Buzz Kettles wrote:

> At 9:14 AM -0800 2/18/03, you wrote:
> >Is there a way to reliably get the day of the week from the longDate
> >or systemDate? Across all regional settings?
> >
> >I can do it in Flash, but was wondering if there is some Lingo
> >property I'm not aware of.
> >
> >-Phil
>
> 'the long date' returns a string & you can tear it out of that
>
> on getDayOfWeek
>    x = the long Date
>    old = the itemDelimiter
>    the itemDelimiter = ","
>    theDay = x.item[1]
>    the itemDelimiter = old
>    return theDay
> end
>
> put getDayOfWeek()
> -- "Tuesday"
>
> However - 'the long date' doesn't work well across languages -
> you might need to add a case statement to change the extracted item
>
> so it's easier to use the systemDate() with a base date as a reference
>
> on getDay
>    baseDate = date( 2003, 1, 5 ) -- first Sunday of this year (it can
> be any Sunday in the past)
>    days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
> "Friday", "Saturday"]
>    return days[(the systemDate - baseDate) mod 7 + 1]
> end
>
> put getday()
> -- "Tuesday"
>
> hth
> -Buzz
> [To remove yourself from this list, or to change to digest mode, go to 
>http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
>[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
>learning and helping with programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to