Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Values returned by cmonth(), cdow() functions
Message
From
28/02/2002 07:13:56
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
27/02/2002 17:32:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00626055
Message ID:
00626282
Views:
15
>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
>
>b. The operating system based on language of operating system (ie. English version of Windows 98 might always return English month/day names?)
>
>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)
>
>d. Operating system specific behavior (Win 9X different than NT/2000/XP???)
>
>e. Other
>
>Thanks!
>Malcolm

Just in case you want to return the name of the month in a specific language, I recommend you write your own function, so it works in all versions of VFP. The function is quite simple:
* Return name of month, in Spanish
FUNCTION NameOfMonth(tnMonth)
if vartype(tnMonth) = "D"
  tnMonth = month(tnMonth)
endif
do case
case tnMonth = 1
  return "Enero"
case tnMonth = 2
  return "Febrero"
...
endcase
ENDFUNC
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform