Standard class for time *period*?
rbowman
bowman at montana.com
Mon Mar 27 11:34:14 EDT 2023
On Mon, 27 Mar 2023 15:00:52 +0200, Loris Bennett wrote:
> I need to deal with what I call a 'period', which is a span of time
> limited by two dates, start and end. The period has a 'duration',
> which is the elapsed time between start and end. The duration is
> essentially a number of seconds, but in my context, because the
> durations are usually hours or days, I would generally want to display
> the duration in a format such as "dd-hh:mm:ss"
https://www.programiz.com/python-programming/datetime
Scroll down to timedelta. If '14 days, 13:55:39' isn't good enough you'll
have to format it yourself.
More information about the Python-list
mailing list