utctime

package
v1.3.24 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 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

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

func (t UTCTime) Day() int

func (UTCTime) Hour

func (t UTCTime) Hour() int

func (UTCTime) MarshalJSON

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

func (UTCTime) Minute

func (t UTCTime) Minute() int

func (UTCTime) Month

func (t UTCTime) Month() Month

func (UTCTime) Second

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

func (t UTCTime) Year() int

Jump to

Keyboard shortcuts

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