> wxDateTime.SetMonth() fails for the following months:
>
> Feb, Apr, Jun, Sep, Nov.
>
> Here's a test case that illustrates the problem.
>
> def testSetMonth(self):
> dateTime = wxDateTime()Don't you need to initialise dateTime? If I try to print
dateTime here, I
get an exception. So I'd expect that setting a single part
(the month) could
well give undefined results.Do you get the same thing if you initialise dateTime to
today's date & time?Paul.
Good point, Paul. If I initialize the date with wxDateTimeFromDMY or
wxDateTime_Now the problem doesn't occur. However, it's strange that the
problem only occurs for five of the months.
I wrote a test in C++ (which I should have done in the first place) and I
get the exact same behavior. The problem isn't in wxPython (I will ammend
the bug report - if I can figure out how to) and I'll look at the wxWindows
source to see if I can figure out what is happening.
Thanks!
Mark