time

package
v0.0.1-dev-fe8dc22 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatBmc      = "Mon Jan 2 15:04:05 2006"
	FormatISO8601  = "2006-01-02T15:04:05"
	FormatISO8601Z = "2006-01-02T15:04:05+00:00"
	FormatRFC3339  = time.RFC3339
	FormatRFC3339Z = "2006-01-02T15:04:05Z07:00"
)

Variables

View Source
var (
	Day = 24 * time.Hour

	LocalZone        = "+00:00"
	LocalZoneSeconds = 0
	LocalFixedZone   = time.FixedZone("", LocalZoneSeconds)
)

Functions

func Boot

func Boot() string

func ISO8601Z

func ISO8601Z(t time.Time) string

func LocalRFC3339

func LocalRFC3339(t time.Time) string

func LocalRFC3339AddDuration

func LocalRFC3339AddDuration(t time.Time, duration time.Duration) string

func NowLocal

func NowLocal() string

func NowRFC3339

func NowRFC3339() string

func RFC3339

func RFC3339(duration time.Duration) string

func RFC3339Z

func RFC3339Z(t time.Time) string

func UTC

func UTC(t time.Time) string

Types

type Period

type Period struct {
	Start string
	Stop  string
	Past  string
}

func (*Period) InBetween

func (p *Period) InBetween(timeAt string) bool

Jump to

Keyboard shortcuts

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