Ed Leafe wrote:
···
On May 19, 2005, at 5:52 AM, Vladimir Ignatov wrote:
Just found a bug in wx.DateTime. The following code:
date = wx.DateTime.Today()
date.SetYear( 1999 )
date.SetMonth( 2 )
date.SetDay( 3 )
print repr(date)prints "<wx.DateTime: "03/03/99 00:00:00" at _c8876101_p_wxDateTime>" on my system (wxPython2.6-win32-unicode-2.6.0.1pre.20050517-py24.exe)
Note that "month" value (2) is not here. I make a unittest for this issue (test_BUG_repr function).
No, this is correct. Months are numbered from 0-11.
Actually, they are numbered from wx.DateTime.Jan to wx.DateTime.Dec.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!