timerange

package
v0.0.0-...-202a999 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidRange represents an invalid time range error.
	ErrInvalidRange = errors.New("invalid time range")
)

Functions

func Apply

func Apply(t time.Time, input string) (time.Time, error)

Apply applies a string-defined time range to a specific date.

func FromDuration

func FromDuration(d time.Duration) string

FromDuration converts a duration into a string-defined time range.

func IsValid

func IsValid(input string) bool

IsValid returns whether or not a time range is valid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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