Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Values returned by cmonth(), cdow() functions
Message
De
28/02/2002 20:39:29
 
 
À
27/02/2002 17:59:35
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00626055
Message ID:
00626764
Vues:
17
Dragan,

Thanks for responding! If I understand your findings, it means that in your environment cdow() and cmonth() return English text because you are (my assumption) using the English VFP runtime resource file.

However, when you print today's date via

set date to long
?date()

You get Serbian vs. English text because your workstation has been set to a Serbian locale?

If this is so, then my conclusion is that one should set date to long, and step through a set of dates (7 consecutive days, 12 consecutive months) to extract out locale specific day and month names and place these in an application 'locale' object/array referenced by replacement functions for cdow() and cmonth()? Or use Windows API functions that return day and month names.

Thanks!
Malcolm
'Confused in NJ' :)


>>Where does VFP go to get the language/locale specific month and day names returned by the functions cmonth() and cdow()?
>>
>>a. The language specific VFP runtime DLL
>
>Cdow() and cmonth() do take this.
>
>>c. The operating system based on user language preference (assumes that Windows keeps a list of language specific lookup values for locale specific information such as month and day names)
>
>This works when you Set Date Short or Set Date Long - then it's taken from here when you display the date. On my machine (with a Serbian Latin locale), after Set Date Long, today's date looks like "27. februar 2002"
>
>>d. Operating system specific behavior (Win 9X different than NT/2000/XP???)
>
>This needs testing, though. But the answer about cdow() and cmonth() is (a).
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform