timex

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDay

func GetDay() string

func GetDayInt

func GetDayInt() (int, error)

func GetDayIntOrPanic

func GetDayIntOrPanic() int

func GetDayListFromIntDayList

func GetDayListFromIntDayList(list []int) []string

func GetEscapeTimePlainStr

func GetEscapeTimePlainStr(ti time.Duration) string

func GetRFC3339Time

func GetRFC3339Time(target string) (time.Time, error)

func GetTimeByFormat

func GetTimeByFormat(target, format string) (time.Time, error)

func GetTimeYYYYMMDD

func GetTimeYYYYMMDD(t time.Time) string

func GetTomorrowIntOrPanic

func GetTomorrowIntOrPanic() int

func GetTwoDateDayIntList

func GetTwoDateDayIntList(start, end time.Time) ([]int, error)

func GetTwoTimeEscapeStr

func GetTwoTimeEscapeStr(start, end time.Time) string

func GetYYYYMMDD

func GetYYYYMMDD() string

func GetYYYYMMDDHHMMSS

func GetYYYYMMDDHHMMSS() string

func GetYYYYMMDDTime

func GetYYYYMMDDTime(target string) (time.Time, error)

func GetYYYYMMTime

func GetYYYYMMTime(target string) (time.Time, error)

func GetYYYYTime

func GetYYYYTime(target string) (time.Time, error)

func GuessTime

func GuessTime(str string) (time.Time, error)

func IsBeforeToday

func IsBeforeToday(d time.Time) bool

func IsToday

func IsToday(d time.Time) bool

func IsZero

func IsZero(t time.Time) bool

Types

type Escape

type Escape struct {
	Day    int64
	Hour   int64
	Minute int64
	Second int64
}

func GetEscapeTime

func GetEscapeTime(ti time.Duration) Escape

Jump to

Keyboard shortcuts

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