[issue10427] 24:00 Hour in DateTime

2013-08-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> rejected stage: test needed -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue10427] 24:00 Hour in DateTime

2012-05-07 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue10427] 24:00 Hour in DateTime

2011-04-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Is there still interest in pursuing this? Normalizing out of bounds arguments to datetime constructor is easy, but rather pointless. It is trivial to implement this functionality using existing timedelta constructor: def normdatetime(Y, M, D, h, m, s

[issue10427] 24:00 Hour in DateTime

2010-11-21 Thread Mark Dickinson
Mark Dickinson added the comment: > What about time objects? If we take the "normalized at creation time" > approach, time(24) may still be disallowed. Yes, I guess that would follow. That wouldn't bother me too much. :-) -- ___ Python tracker

[issue10427] 24:00 Hour in DateTime

2010-11-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Nov 21, 2010 at 3:48 PM, Mark Dickinson wrote: .. > 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: .. What ab

[issue10427] 24:00 Hour in DateTime

2010-11-21 Thread Mark Dickinson
Mark Dickinson added the comment: > 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 ex

[issue10427] 24:00 Hour in DateTime

2010-11-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Nov 21, 2010 at 1:24 PM, Rodrigo Bernardo Pimentel 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,

[issue10427] 24:00 Hour in DateTime

2010-11-21 Thread ingo janssen
ingo janssen added the comment: On Sun, Nov 21, 2010 at 7:24 PM, Rodrigo Bernardo Pimentel wrote: > I would say those aren't valid, although that makes checking forvalid hour > values slightly weird >(as in not straightforward): 24 is valid if minutes, seconds and microseconds >are all 0, but

[issue10427] 24:00 Hour in DateTime

2010-11-21 Thread Rodrigo Bernardo Pimentel
Rodrigo Bernardo Pimentel added the comment: 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)? I would say those aren't valid, although that mak

[issue10427] 24:00 Hour in DateTime

2010-11-15 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10427] 24:00 Hour in DateTime

2010-11-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: +1 Note that in Python, semi-open intervals are favored, but specifying the last hour of the day is awkward when using datetime (as OP mentioned) and impossible using just time. Using closed intervals is not a good work-around in many cases because it

[issue10427] 24:00 Hour in DateTime

2010-11-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Library (Lib) nosy: +belopolsky, ezio.melotti versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker

[issue10427] 24:00 Hour in DateTime

2010-11-15 Thread ingo janssen
New submission from ingo janssen : Short: make the DateTime class and related also accept 24 for the hour instead of stopping at 23:59:59. from the python doc: "class datetime.datetime(year, month, day[, hour[, minute[, second[, microsecond[, tzinfo]) The year, month and day arguments are