duration

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSyntax = errors.New("invalid syntax")

Functions

func Sub

func Sub(t time.Time, d Duration) time.Time

Types

type Duration

type Duration struct {
	// contains filtered or unexported fields
}

Durations supports the year-month-day subset of an RFC 3339 duration https://www.rfc-editor.org/rfc/rfc3339

func Parse

func Parse(s string) (Duration, error)

func (Duration) IsZero

func (d Duration) IsZero() bool

func (Duration) String

func (d Duration) String() string

Jump to

Keyboard shortcuts

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