temporal

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bound

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

Bound defines a time interval

func NewBound

func NewBound(start, end time.Time) Bound

NewBound creates a spoke-bound within start,end time bounds

func (*Bound) Contains

func (sb *Bound) Contains(o *Bound) bool

Contains returns true if sb fully contains o

func (*Bound) ContainsTime

func (sb *Bound) ContainsTime(t time.Time) bool

ContainsTime returns true if this time instant is bounded by this spoke

func (*Bound) End

func (sb *Bound) End() time.Time

End returns the ending time of this spoke bound (exclusive)

func (*Bound) IsExpired

func (sb *Bound) IsExpired() bool

IsExpired returns true if SpokeBound ended in the past

func (*Bound) IsStarted

func (sb *Bound) IsStarted() bool

IsStarted returns true if this time Bound started in the past time.Now() may or may not be after this bound's end

func (*Bound) Start

func (sb *Bound) Start() time.Time

Start returns the starting time of this spoke bound (inclusive)

type State

type State int

State is a classification of time for an object

const (
	// Past in time
	Past State = iota
	// Current in time
	Current
	// Future in time
	Future
)

Jump to

Keyboard shortcuts

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