[wxPython] python wxDateTimeFromDMY bug???

Hello.

Why when I write:

b = wxDateTimeFromDMY(28, 8, 2002)
print a

sáb 28 sep 2002.......
it reports me September, not August.

I watch that the month number must be from 0 to 11, not from 1 to 12,
but the day number is from 1 to 31, not from 0 to 30

Is it a bug...? or it's correct...

Julio Jiménez

Note: wxPython 2.3.2 on Python 2.2.1

Why when I write:

>b = wxDateTimeFromDMY(28, 8, 2002)
>print a
s�b 28 sep 2002.......
it reports me September, not August.

I watch that the month number must be from 0 to 11, not from 1 to 12,

Because the 8th month in a 0..11 range is September. August is month 7.

from wxPython.wx import *

wxDateTime.Aug

7

wxDateTime.Sep

8

···

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

hello again

Ok. this what I know, but It is ok?
(range for number of day is from 1 to 31; logic from month number would be
from 1 to 12, not from 0 to 11)

Then I must think that it is ok, but not logic... :slight_smile: and it will not
change...in future versions...

Julio Jiménez

···

On Wednesday 28 August 2002 17:54, you wrote:

> Why when I write:
> >b = wxDateTimeFromDMY(28, 8, 2002)
> >print a
>
> sáb 28 sep 2002.......
> it reports me September, not August.
>
> I watch that the month number must be from 0 to 11, not from 1 to 12,

Because the 8th month in a 0..11 range is September. August is month 7.

>>> from wxPython.wx import *
>>>
>>> wxDateTime.Aug

7

>>> wxDateTime.Sep

8