%{
#include <wx/datetime.h>
- DECLARE_DEF_STRING2(DateFormatStr, wxT("%c"));
- DECLARE_DEF_STRING2(TimeSpanFormatStr, wxT("%H:%M:%S"));
-
-%}
+%}
+MAKE_CONST_WXSTRING2(DateFormatStr, wxT("%c"));
+MAKE_CONST_WXSTRING2(TimeSpanFormatStr, wxT("%H:%M:%S"));
//---------------------------------------------------------------------------
-%typemap(in) wxDateTime::TimeZone& {
+%typemap(in) wxDateTime::TimeZone& (bool temp=False) {
$1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong($input));
+ temp = True;
}
%typemap(python,freearg) wxDateTime::TimeZone& {
- if ($1) delete $1;
+ if (temp$argnum) delete $1;
}
//---------------------------------------------------------------------------
+//typedef unsigned short wxDateTime_t;
+#define wxDateTime_t int
// wxDateTime represents an absolute moment in the time
class wxDateTime {
public:
- typedef unsigned short wxDateTime_t;
enum TZ
{
static wxString GetWeekDayName(WeekDay weekday,
NameFlags flags = Name_Full);
- // get the AM and PM strings in the current locale (may be empty)
- static void GetAmPmStrings(wxString *OUTPUT, wxString *OUTPUT);
+ DocDeclAStr(
+ static void, GetAmPmStrings(wxString *OUTPUT, wxString *OUTPUT),
+ "GetAmPmStrings() -> (am, pm)",
+ "Get the AM and PM strings in the current locale (may be empty)");
// return True if the given country uses DST for this year
static bool IsDSTApplicable(int year = Inv_Year,