time

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Year   = "2006"
	Month  = "01"
	Day    = "02"
	Hour   = "15"
	Minute = "04"
	Second = "05"

	FmtYMdHmsSSS = "2006-01-02 15:04:05.000"
	FmtYMdHmsS   = "2006-01-02 15:04:05.0"
	FmtYMdHms    = "2006-01-02 15:04:05"
	FmtYMdHm     = "2006-01-02 15:04"
	FmtYMdH      = "2006-01-02 15"
	FmtYMd       = "2006-01-02"
	FmtYM        = "2006-01"
	FmtY         = "2006"
	FmtYYYYMMdd  = "20060102"

	FmtHmsSSSMore = "15:04:05.000000000"
	FmtHmsSSS     = "15:04:05.000"
	FmtHms        = "15:04:05"
	FmtHm         = "15:04"
	FmtH          = "15"
)

Functions

func ParseTimeYmsHms

func ParseTimeYmsHms(timeStr string) (time.Time, error)

func ParseTimeYmsHmsLoc

func ParseTimeYmsHmsLoc(timeStr string, loc *time.Location) (time.Time, error)

func ParseTimeYmsHmsS

func ParseTimeYmsHmsS(timeStr string) (time.Time, error)

func ParseTimeYmsHmsSLoc

func ParseTimeYmsHmsSLoc(timeStr string, loc *time.Location) (time.Time, error)

func TimeToStringFormat

func TimeToStringFormat(t time.Time, format string) string

func TimeToStringYmdHms

func TimeToStringYmdHms(t time.Time) string

func TimeToStringYmdHmsS

func TimeToStringYmdHmsS(t time.Time) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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