period

package
v0.0.0-...-234d840 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Second Period = 1
	Minute        = 60 * Second
	Hour          = 60 * Minute
	Day           = 24 * Hour
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Period

type Period int64 // seconds

duration

func ParsePeriod

func ParsePeriod(s string) (Period, error)

func PeriodByDuration

func PeriodByDuration(d time.Duration) Period

func (Period) Duration

func (p Period) Duration() time.Duration

func (Period) MarshalText

func (p Period) MarshalText() (text []byte, err error)

func (Period) String

func (p Period) String() string

func (*Period) UnmarshalText

func (p *Period) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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