909 B
909 B
clocktime
clocktime provides a type that holds a calendar-independent time of day value in 24-hour format.
clocktime provides basic types that extend Go's built-in time.Time to provide time-of-day and duration support.
`clocktime.ClockTime
Holds calendar-independent time-of-day in 24-hour format.
- Converts to and from
HH:MM:SSformat (subset of ISO8061) - Marshals to
[]bytecontaining stringHH:MM:SSfor SQL - Marshals to
stringin formatHH:MM:SSfor JSON & gqlgen
clocktime.Duration
Wraps time.Duration with prioritized ISO8061 support and opinionated marshalling.
- Converts to and from ISO8061 format (utilises sosodev/duration)
- Marshals to
uint64with nanosecond precision. Largest representatable duration is about 290 years, limited by underlying time.Duration type. - Marshals to
stringin ISO8061 format for JSON & gqlgen