tmu

package
v1.0.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2024 License: MIT Imports: 5 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Atod added in v1.0.17

func Atod(s string, defs ...time.Duration) time.Duration

Atod convert string to time.Duration. if not found or convert error, returns the defs[0] or zero.

Types

type HHMM

type HHMM int

HHMM HH:MM (Minutes)

func ParseHHMM

func ParseHHMM(s string) (HHMM, error)

func (HHMM) MarshalJSON

func (hm HHMM) MarshalJSON() ([]byte, error)

func (HHMM) Minutes

func (hm HHMM) Minutes() int

func (HHMM) String

func (hm HHMM) String() string

func (*HHMM) UnmarshalJSON

func (hm *HHMM) UnmarshalJSON(data []byte) (err error)

type MMSS

type MMSS int

MMSS MM:SS (Seconds)

func ParseMMSS

func ParseMMSS(s string) (MMSS, error)

func (MMSS) MarshalJSON

func (ms MMSS) MarshalJSON() ([]byte, error)

func (MMSS) Seconds

func (ms MMSS) Seconds() int

func (MMSS) String

func (ms MMSS) String() string

func (*MMSS) UnmarshalJSON

func (ms *MMSS) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL