Version: v1.2.1 Latest Latest

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

Go to latest
Published: Apr 14, 2022 License: AGPL-3.0 Imports: 2 Imported by: 22




View Source
const TimeFormat = "2006-01-02T15:04:05-0700"

TimeFormat of JSONTime


This section is empty.


This section is empty.


type Time

type Time struct {
	// contains filtered or unexported fields

Time struct of JSONTime

func Now

func Now() Time

Now current Time

func (Time) Add

func (t Time) Add(d time.Duration) Time

Add given Duration to this time

func (Time) After

func (t Time) After(u Time) bool

After is this time after the given?

func (Time) Before

func (t Time) Before(u Time) bool

Before is this time before the given?

func (Time) GetTime

func (t Time) GetTime() time.Time

GetTime normal

func (Time) IsZero

func (t Time) IsZero() bool

IsZero is time zero?

func (Time) MarshalJSON

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

MarshalJSON to bytearray

func (Time) Unix

func (t Time) Unix() int64

Unix of this time

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON from bytearray

Source Files

Jump to

Keyboard shortcuts

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