On 2022-04-14, Paul Bryan <pbr...@anode.ca> wrote:
> I think because minutes and hours can easily be composed by multiplying
> seconds. days is separate because you cannot compose days from seconds;
> leap seconds are applied to days at various times, due to
> irregularities in the Earth's rotation.

That's an argument that timedelta should *not* have a 'days' attribute,
because a day is not a fixed number of seconds long (to know how long
a day is, you have to know which day you're talking about, and where).
It's an undocumented feature of timedelta that by 'day' it means '86400
seconds'.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to