Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Mainly because you can use normal modulo arithmetic and use them as array indices.

But as I mentioned in another comment, really you should be touching the internals of the datetime object at all. It's a mistake to do something like `myDatetime.day += 1`. You should instead do `myDatetime + timeDelta(days=1)` or something.

So it shouldn't matter whether it's 0-based or 1-based at all. But since it apparently does (I don't know why), then it might as well by 0-based like everything else.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: