Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieve month and day names for a specific locale?
Message
From
21/06/2006 14:51:00
 
 
To
21/06/2006 11:45:16
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01130529
Message ID:
01130591
Views:
28
This message has been marked as the solution to the initial question of the thread.
>Is there a technique for retrieving a list of month and day names (and abbreviations?) from the OS using a specific locale identifier?
>
>My understanding is that cmonth() and cdow() return values that are hard coded in VFP's runtime library.
>
>GetLocaleInfo() does not appear to provide this information.
>http://news2news.com/vfp/?example=76&function=110
>
>Any suggestions?
>

Hi Mal :)

The link you provided is for members only. Anyway, the GetLocaleInfo provides all info for names of Day and Month.

The constant to retrieve names of the day is:
#Define LOCALE_SDAYNAME1   0x0000002A  && long name for Monday
...
#Define LOCALE_SDAYNAME7   0x00000030  && long name for Sunday

#Define LOCALE_SABBREVDAYNAME1  0x00000031   && abbreviated name for Monday
...
#Define LOCALE_SABBREVDAYNAME7  0x00000037   && abbreviated name for Sunday
And the constant to retrieve names of the month is:
#Define LOCALE_SMONTHNAME1    0x00000038  && long name for January
...
#Define LOCALE_SMONTHNAME12   0x00000043  && long name for December

#Define LOCALE_SABBREVMONTHNAME1   0x00000044   && abbreviated name for January
...
#Define LOCALE_SABBREVMONTHNAME12  0x0000004F   && abbreviated name for December
HTH
Herman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform