time

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YYYYMMDDhhmmss = "2006-01-02 15:04:05"
	YYYYMMDDhhmm   = "2006-01-02 15:04"

	YYYYMMDD000000 = "2006-01-02 00:00:00"
)

Variables

This section is empty.

Functions

func DayEndTime

func DayEndTime(ti time.Time) (int64, error)

func DayStart

func DayStart(ti time.Time) string

func DayStartTime

func DayStartTime(ti time.Time) (int64, error)

func Format

func Format(t time.Time) string

func HumanizeDurationInt

func HumanizeDurationInt(now, before int) string

func HumanizeDurationInt64

func HumanizeDurationInt64(now, before int64) string

func IsWeekend

func IsWeekend(t time.Time) bool

func NowDate

func NowDate() string

func Parse

func Parse(timestr string) (int64, error)

"2016-11-02 05:14:25"

func ParseNoSecond

func ParseNoSecond(timestr string) (int64, error)

func UnixMillisecond

func UnixMillisecond() int64

func UnixTsFormat

func UnixTsFormat(ts int64) string

func UnixTsFormatMinute

func UnixTsFormatMinute(ts int64) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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