utctime

package
v1.7.13 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Month added in v1.0.2

type Month int

A Month specifies a month of the year (January = 1, ...).

const (
	January Month = 1 + iota
	February
	March
	April
	May
	June
	July
	August
	September
	October
	November
	December
)

type UTCTime

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

UTCTime is a wrapper of Golang time.Time in UTC

func FromTime

func FromTime(t gotime.Time) UTCTime

func FromUnixNano

func FromUnixNano(unixNano int64) UTCTime

func MustParse

func MustParse(layout string, value string) UTCTime

func Now

func Now() UTCTime

func Parse

func Parse(layout string, value string) (UTCTime, error)

func (UTCTime) Add

func (t UTCTime) Add(d gotime.Duration) UTCTime

func (UTCTime) Day added in v1.0.2

func (t UTCTime) Day() int

func (UTCTime) Hour added in v1.0.2

func (t UTCTime) Hour() int

func (UTCTime) MarshalJSON

func (t UTCTime) MarshalJSON() ([]byte, error)

func (UTCTime) Minute added in v1.0.2

func (t UTCTime) Minute() int

func (UTCTime) Month added in v1.0.2

func (t UTCTime) Month() Month

func (UTCTime) Second added in v1.0.2

func (t UTCTime) Second() int

func (UTCTime) String

func (t UTCTime) String() string

func (UTCTime) UnixNano

func (t UTCTime) UnixNano() int64

func (*UTCTime) UnmarshalJSON

func (t *UTCTime) UnmarshalJSON(data []byte) error

func (UTCTime) Year added in v1.0.2

func (t UTCTime) Year() int

Jump to

Keyboard shortcuts

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