Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrParseFailed = errors.New("invalid string format. Expected HH:MM:SS")
Functions ¶
This section is empty.
Types ¶
type HMS ¶ added in v0.0.2
type HMS int64
HMS holds time in format HH:MM:SS with 24 hours limit. The value is stored in seconds.
func (HMS) Add ¶ added in v0.0.2
Add adds duration to HMS and returns new HMS. If the result of addition causes the time to go past 24:00, then 24 hours are subtracted from the result.
func (HMS) Subtract ¶ added in v0.0.2
Subtract subtracts duration from HMS and returns new HMS. If the result of subtraction causes the time to go below 00:00, then 24 hours are added to the result.
func (HMS) ToDuration ¶ added in v0.0.2
ToDuration returns value as time.Duration.
Click to show internal directories.
Click to hide internal directories.