Standard class for time *period*?

rbowman bowman at montana.com
Tue Mar 28 10:17:08 EDT 2023


On Tue, 28 Mar 2023 15:11:14 +0200, Loris Bennett wrote:


> But even if I have a single epoch, January 2022 is obviously different
> to January 2023, even thought the duration might be the same.  I am just
> surprised that there is no standard Period class, with which I could
> create objects and then be able to sort, check for identity, equality of
> length, amount of overlap, etc.  I suppose people just use a
> datetime.datetime pair, as I have been doing so far, and tack on just
> the specific bit of functionality they need.

It's called Unix time...  Convert the seconds into whatever you want. 


More information about the Python-list mailing list