Why on earth is 'tomorrow' just +24 (local) hours. I'd expect it to be the next calendar date.
Re:Maya – Python Datetimes for Humans
by icebraining on Sunday December 18, 2016 @11:00AM
(#13206203)
Next calendar date according to which calendar? Not all places in the world are on the same date, so if you don't indicate the timezone, there's no way to tell what the next calendar date is.
I suppose due to DST, the same clock time on the next calendar date might not exist or be ambiguous.
Conversely, +24 hours may fall on the same calendar date or two calendar days on from now.
Really, "tomorrow" should be the interval from the beginning of the next calendar date to the end.
I'm pretty sure that it's 23 because some time passed between keystrokes, so the delta was 23:59:50, and he only keeps the most significant digit. I had to do this exact thing yesterday for timetaco.com.
Shouldn't it be immutable? I'd expect this to be a default behaviour.
Not in this case. The entire proposition of slang_time is that it returns human readable time difference with respect to now (i.e., the moment when called).
Re:Maya – Python Datetimes for Humans
by paulddraper on Sunday December 18, 2016 @07:51AM
(#13205633)
In this case, consistency would imply the immutability of time.
Shouldn't it round up?
If it's 01:00:01, is it two hours?
If it's 00:59:50, is it 0 hours?
i have the feeling his natural answer to both questions is no...
This is actually my biggest gripe with date+time libs. Imho API should always be explicit in what its default TZ is.
EDIT: still, appreciate what you are doing. Requests rule, and there are many other areas (including datetime) that need libs with better APIs. Thumbs up!