jsontime

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2018 License: AGPL-3.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

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

TimeFormat of JSONTime

Variables

This section is empty.

Functions

This section is empty.

Types

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

Jump to

Keyboard shortcuts

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