[wxPython-users] DateTime.GetMonth returns 0-based months

Robin Dunn robin at alldunn.com
Mon Jun 18 10:43:38 PDT 2007


Christian K wrote:
> Hi,
> 
> I just noticed that wx.DateTime.GetMonth returns numbers in the range of 0-11.
> This is quite strange considered that GetDay returns numbers in the range of
> 1-31. At least this is not mentioned in the docs as far I have seen.

Actually it returns items from the wxDateTime::Month enumeration, which 
are accessible from wxPython as wx.DateTime.Jan through wx.DateTime.Dec. 
  In order to be compliant with most C library time and date functions 
wx.DateTime.Jan is equivalent to integer zero.

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list