Store more data inside of timedeltas

According to the docs, only days, seconds, and microseconds are store internally. What’s confusing to me is much more can be passed, including hours and minutes. My suggestion/question is why aren’t more attributes stored?

Because everything is normalised to days/seconds/microseconds. So 1 minute is stored as 60 seconds, and if you ask how many minutes, the 60 seconds is converted back into 1 minute. The performance cost is negligible, and by holding the data like this there’s no need to maintain multiple representations in parallel.

4 Likes