Hello,
Actually is not so strange. The second parameter is an enumeration type.
From WxWidgets sources:
The function prototype, located in datetime.h is:
wxDateTime& Set(wxDateTime_t day,
Month month,
int year = Inv_Year, // 1999, not 99 please!
wxDateTime_t hour = 0,
wxDateTime_t minute = 0,
wxDateTime_t second = 0,
wxDateTime_t millisec = 0);
Where month is an enumeration declared internaly into wxDateTime class as:
enum Month
{
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, Inv_Month
};
When you are passing 0, it is casted to the Month enumeration type and correspond to Jan.
Why the enumeration should start with value 1, WxWidgets is a C++ library and for a C++ programmer everything starts with 0.
And WxPython is only a Python package calling the WxWidgets C++ library.
I guess you can use an intermediary variable to do this, but this practice is not normal nor recommended.
BTW, I used the WxWidgets C++ library, but never WxPython, what is your impression on WxPython ?
Thank you.
Adrian