Message121985
> As you make progress on the patch, you will face more questions.
Well, if all that's wanted is for hour==24 to be legal on input, with the datetime object itself being automatically normalized at creation time, then the choices seem simple: e.g.,
> For example, what should datetime(y, m, d, 24).date() return? date(y,
> m, d) or date(y, m, d) + timedelta(1)?
The latter, since the two datetime objects would be indistinguishable...
> Should strptime() parse '24' as a valid %H field?
I'd say yes, provided that any minute, second or subsecond fields are all zero.
FWIW, I'm in the camp that says hour==24 should only be legal if all values for smaller time units are zero.
If a datetime object created with 'hour==24' doesn't immediately normalize itself, then I agree there are going to be a lot of hairy questions... |
|
Date |
User |
Action |
Args |
2010-11-21 20:48:54 | mark.dickinson | set | recipients:
+ mark.dickinson, belopolsky, rbp, ezio.melotti, eric.araujo, ingo.janssen |
2010-11-21 20:48:54 | mark.dickinson | set | messageid: <1290372534.23.0.372628773275.issue10427@psf.upfronthosting.co.za> |
2010-11-21 20:48:52 | mark.dickinson | link | issue10427 messages |
2010-11-21 20:48:52 | mark.dickinson | create | |
|