You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Convert durations between colon formatted time, human-readable time and seconds
This package was created with a very specific goal in mind, to enable an easy way for users to input how long something took, as a duration of time.
The library can accept either in colon separated format, like 2:43 for 2 minutes and 43 secondsORwritten as human readable or abbreviated time, such as 6m21s for 6 minutes and 21 seconds.
Both can be converted into seconds and minutes with precision for easy storage into a database.
Seconds, colon separated, abbreviated, all three can be parsed and interchanged.
supports hours, minutes, and seconds (with microseconds)
humanized input supports any form of the words "hour", "minute", "seconds"
You do not have to create a new object for each conversion, you can also pass any of the three forms into any of the methods to get the immediate output.