Re: [dabo-dev] Two questions

Author: Paul McNett

Posted: 2005-03-15 at 11:09:39

Ed Leafe wrote:

> On Mar 15, 2005, at 10:18 AM, Paul McNett wrote:

>

>> Is the day zero-indexed as well?

>

>

> No, it's the actual day.

>

>>> Should we change getDateTuple() to return the one-based month?

>>> Should today's date be returned as (2005, 2, 15) or (2005, 3, 15)?

>>

>>

>> I'd like to see arguments in favor of zero-based dates. At this point

>> it only seems sensible to make them 1-based like how the world really

>> works.

>

>

> Well, out of the three values in the tuple, only one is typically

> written in character form: the month. If you have:

>

> months = (January, February, ...)

>

> then it certainly makes sense to have the month return the proper index.

Very true. We should probably keep the zero-indexing, because that's how

Python does it. When people wonder we can refer them to the Python docs.

However, we should be able to display the proper month number to the

user regardless, no?

--

pkm ~ http://paulmcnett.com

©2005 Paul McNett