Fix GetAmPmStrings wrapper
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -363,11 +363,24 @@ public:
|
|||||||
static wxString GetWeekDayName(WeekDay weekday,
|
static wxString GetWeekDayName(WeekDay weekday,
|
||||||
NameFlags flags = Name_Full);
|
NameFlags flags = Name_Full);
|
||||||
|
|
||||||
DocDeclAStr(
|
%extend {
|
||||||
static void, GetAmPmStrings(wxString *OUTPUT, wxString *OUTPUT),
|
DocAStr(
|
||||||
"GetAmPmStrings() -> (am, pm)",
|
GetAmPmStrings,
|
||||||
"Get the AM and PM strings in the current locale (may be empty)", "");
|
"GetAmPmStrings() -> (am, pm)",
|
||||||
|
"Get the AM and PM strings in the current locale (may be empty)", "");
|
||||||
|
static PyObject* GetAmPmStrings() {
|
||||||
|
wxString am;
|
||||||
|
wxString pm;
|
||||||
|
wxDateTime::GetAmPmStrings(&am, &pm);
|
||||||
|
bool blocked = wxPyBeginBlockThreads();
|
||||||
|
PyObject* tup = PyTuple_New(2);
|
||||||
|
PyTuple_SET_ITEM(tup, 0, wx2PyString(am));
|
||||||
|
PyTuple_SET_ITEM(tup, 1, wx2PyString(pm));
|
||||||
|
wxPyEndBlockThreads(blocked);
|
||||||
|
return tup;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// return True if the given country uses DST for this year
|
// return True if the given country uses DST for this year
|
||||||
static bool IsDSTApplicable(int year = Inv_Year,
|
static bool IsDSTApplicable(int year = Inv_Year,
|
||||||
Country country = Country_Default);
|
Country country = Country_Default);
|
||||||
|
Reference in New Issue
Block a user