timex

package
v0.0.0-...-75d2a66 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SecondsPerMinute = 60
	SecondsPerHour   = 60 * 60
	SecondsPerDay    = 24 * SecondsPerHour
	SecondsPerWeek   = 7 * SecondsPerDay
	DaysPer400Years  = 365*400 + 97
	DaysPer100Years  = 365*100 + 24
	DaysPer4Years    = 365*4 + 1
)

Variables

View Source
var UTC8 = time.FixedZone("UTC+8", 8*60*60)

Functions

func FromUnix

func FromUnix(i int64) time.Time

func NextDay0

func NextDay0() time.Time

func Now

func Now() int64

func ToUnix

func ToUnix(t time.Time) int64

func Today0

func Today0() time.Time

Types

type Timex

type Timex struct {
	time.Time
}

func NewTimex

func NewTimex() *Timex

func (*Timex) FromTime

func (timex *Timex) FromTime(t time.Time) *Timex

func (*Timex) FromUnix

func (timex *Timex) FromUnix(i int64) *Timex

func (Timex) MarshalJSON

func (timex Timex) MarshalJSON() ([]byte, error)

func (*Timex) Now

func (timex *Timex) Now() *Timex

func (*Timex) Unix

func (timex *Timex) Unix() int64

func (*Timex) UnmarshalJSON

func (timex *Timex) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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