Non-English dates

Klaus Major klaus at major-k.de
Fri Sep 12 06:44:01 EDT 2003


Hi Hugh

> Two date questions...
>
> I am trying to manipulate locale-independent dates by using dateItems,
> system weekdayNames and system monthNames. As I only have an
> English-based system, could any non-English system users help me out?
>
> [1] Date format convert...
>
> on mouseUp
>   put line 6 of the abbrev system monthNames into tMth # or pick a 
> number 1-12
>   get (tMth & " 1, 2004") # or pick a year
>   convert it to dateItems
>   put it &cr& the result # Do you get "invalid date"?
> end mouseUp

2004,6,1,3,0,0,3

Works here in a german OS X 10.2.6...

> [2] Weekends...
>
> I understand it is dangerous to assume that line 7 of the system 
> weekdayNames
> always refers to a Saturday and line 1 always refers to a Sunday.

But it looks like ;-)

On my german OS X i have "Sonntag" (sunday) as the first line ans 
"Samstag" saturday)
as the last line of the "system weekdaynames", but we start the week on 
monday here
in germanski...

> If this is the case, how do we reliably identify weekend dates?

 From the dox:
For each form of the weekdayNames, if the useSystemDate property is set 
to true, or
if you specify the system weekdayNames, the list of names is provided 
in the language
specified by the user’s system preferences. If the useSystemDate is 
false or you specify
the english weekdayNames, the list of names is provided in English.

Sounds to me like the list is always the same, but will just be 
translated to the current OS language
when you use the "system" keyword...

> /H

Regards

Klaus Major
klaus at major-k.de
www.major-k.de



More information about the use-livecode mailing list