saTime

package
v0.0.0-...-b2602dc Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	FormatDefault = "2006-01-02 15:04:05"
	FormatSystem  = "2006-01-02T15:04:05Z"

	FormatYMDHMS = "2006-01-02 15:04:05"
	FormatYMDHM  = "2006-01-02 15:04"
	FormatYMD    = "2006-01-02"
	FormatY      = "2006"
	FormatHMS    = "15:04:05"
	FormatHM     = "15:04"
	FormatH      = "15"
	FormatM      = "04"
	FormatS      = "05"

	FormatYMDHMSZh = "2006年01月02日 15点04分05秒"
	FormatYMDHMZh  = "2006年01月02日 15点04分"
	FormatYMDZh    = "2006年01月02日"

	FormatYMDHMSDot = "2006.01.02 15:04:05"
	FormatYMDHSDot  = "2006.01.02 15:04"
	FormatYMDDot    = "2006.01.02"

	FormatYMDHMSSimple = "20060102150405"
	FormatYMDHMSimple  = "200601021504"
	FormatYMDHimple    = "2006010215"
	FormatYMDSimple    = "20060102"
)

Variables

This section is empty.

Functions

func AdaptTime

func AdaptTime(s string) time.Time

func Now

func Now() *time.Time

func PtrFromStr

func PtrFromStr(s string, format string) *time.Time

func PtrFromUnix

func PtrFromUnix(unix int64) *time.Time

func TimeFromStr

func TimeFromStr(s string, format string) time.Time

func TimeToStr

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

func WeekIndex

func WeekIndex(t time.Time) int

当年第几周

Types

This section is empty.

Jump to

Keyboard shortcuts

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