Skip to content

Class HM_Duration represents durations as a number of hours and a number of minutes. Among other functionalities, it offers arithmetic operations, string representation and instantiation from a string representation.

License

Notifications You must be signed in to change notification settings

GRV96/hm_duration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hm_duration

Package hm_duration helps working with durations in hours and minutes. Among other functionalities, it offers arithmetic operations, comparison, string representation and instantiation from a string representation.

Package content

HM_Duration

This class represents durations as a number of hours and a number of minutes.

DURATION_STR_PATTERN

This constant stores regular expression "-?\d{1,}:\d{2}". Strings that match it represent durations, and static method HM_Duration.from_str can use them to instantiate HM_Duration.

str_repr_duration

This function determines whether a string matches DURATION_STR_PATTERN. If it does, the string can be used to instantiate HM_Duration.

About

Class HM_Duration represents durations as a number of hours and a number of minutes. Among other functionalities, it offers arithmetic operations, string representation and instantiation from a string representation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages