added GetEnglish{Month,WeekDay}Name()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -113,36 +113,24 @@ static wxString TranslateDate(const wxString& str)
|
||||
|
||||
wxString trans(str);
|
||||
|
||||
static const char *weekdays[] =
|
||||
{
|
||||
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
|
||||
};
|
||||
|
||||
for ( wxDateTime::WeekDay wd = wxDateTime::Sun;
|
||||
wd < wxDateTime::Inv_WeekDay;
|
||||
wxNextWDay(wd) )
|
||||
{
|
||||
trans.Replace
|
||||
(
|
||||
weekdays[wd],
|
||||
wxDateTime::GetEnglishWeekDayName(wd, wxDateTime::Name_Abbr),
|
||||
wxDateTime::GetWeekDayName(wd, wxDateTime::Name_Abbr)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
static const char *months[] =
|
||||
{
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
|
||||
"Nov", "Dec"
|
||||
};
|
||||
|
||||
for ( wxDateTime::Month mon = wxDateTime::Jan;
|
||||
mon < wxDateTime::Inv_Month;
|
||||
wxNextMonth(mon) )
|
||||
{
|
||||
trans.Replace
|
||||
(
|
||||
months[mon],
|
||||
wxDateTime::GetEnglishMonthName(mon, wxDateTime::Name_Abbr),
|
||||
wxDateTime::GetMonthName(mon, wxDateTime::Name_Abbr)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user