Message121985
| Author |
mark.dickinson |
| Recipients |
belopolsky, eric.araujo, ezio.melotti, ingo.janssen, mark.dickinson, rbp |
| Date |
2010年11月21日.20:48:52 |
| SpamBayes Score |
6.422722e-06 |
| Marked as misclassified |
No |
| Message-id |
<1290372534.23.0.372628773275.issue10427@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> 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... |
|