README ¶ tmc time calculator Installation go install github.com/winebarrel/tmc/cmd/tmc@latest Usage $ tmc > 10:10 - 20 + 1:15 11:05 > 10 + 11:20 11:30 > 1:00 - 30 0:30 > 12:00 - 9:15 2:45 Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func DurToStr(dur time.Duration) string func Eval(str string) (time.Duration, error) type Expr func (expr *Expr) Eval() time.Duration type OpeVal type Val func (v *Val) Capture(values []string) error func (v Val) Duration() time.Duration Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func DurToStr ¶ func DurToStr(dur time.Duration) string func Eval ¶ func Eval(str string) (time.Duration, error) Types ¶ type Expr ¶ type Expr struct { Val Val `@Time` OpeVals []OpeVal `@@*` } func (*Expr) Eval ¶ func (expr *Expr) Eval() time.Duration type OpeVal ¶ type OpeVal struct { Ope string `SP* @Ope` Val Val `SP* @Time` } type Val ¶ type Val time.Duration func (*Val) Capture ¶ func (v *Val) Capture(values []string) error func (Val) Duration ¶ func (v Val) Duration() time.Duration Source Files ¶ View all Source files calc.go Directories ¶ Show internal Expand all Path Synopsis cmd tmc Click to show internal directories. Click to hide internal directories.