Message121980
On Sun, Nov 21, 2010 at 1:24 PM, Rodrigo Bernardo Pimentel
<report@bugs.python.org> wrote:
..
> I was writing tests for this issue, when something struck me: ok, datetime(year, month, day, 24) is valid.
> But is datetime(year, month, day, 24, 1) valid? Or datetime(year, month, day, 24, 0, 0, 1)?
>
As you make progress on the patch, you will face more questions. For
example, what should datetime(y, m, d, 24).date() return? date(y, m,
d) or date(y, m, d) + timedelta(1)? Should strptime() parse '24' as a
valid %H field? Similarly, should strftime() produce '24'? Is
datetime(y, m, d, 24) equal to datetime(y, m, d) + timedelta(1)? If
so, hash calculation should be special cased.
On your original question, I feel that hour=24 should be allowed
regardless of the other values. I would recommend, however, that you
review python-dev discussion about allowing second=60 (search for
"leap second"). Once you have a reference implementation you will
need to explain motivations behind your choices on python-dev. |
|
Date |
User |
Action |
Args |
2010-11-21 20:29:07 | belopolsky | set | recipients:
+ belopolsky, rbp, ezio.melotti, eric.araujo, ingo.janssen |
2010-11-21 20:29:06 | belopolsky | link | issue10427 messages |
2010-11-21 20:29:06 | belopolsky | create | |
|