times

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	LayoutDate     = "2006-01-02"
	LayoutTime     = "15:04:05"
	LayoutDateTime = "2006-01-02 15:04:05"
)

Variables

This section is empty.

Functions

func FuncTiming

func FuncTiming(fn func()) time.Duration

FuncTiming 程序运行时间

func GetNowDateStr

func GetNowDateStr() string

GetNowDateStr 获取当前日期的字符串

func GetNowDateTimeStr

func GetNowDateTimeStr() string

GetNowDateTimeStr 获取当前时间日期的字符串

func GetNowTime

func GetNowTime() time.Time

func GetNowTimeStr

func GetNowTimeStr() string

GetNowTimeStr 获取当前时间的字符串

func IsZero

func IsZero(t time.Time) bool

IsZero reports whether t represents the zero time instant

func Location

func Location() *time.Location

func ParseDataTimeToStr

func ParseDataTimeToStr(tm time.Time) string

ParseDataTimeToStr 格式化日期时间

func ParseDataToStr

func ParseDataToStr(tm time.Time) string

ParseDataToStr 格式化日期

func ParseDate

func ParseDate(dateStr string) (time.Time, error)

ParseDate 解析日期

func ParseDateTime

func ParseDateTime(dateTimeStr string) (time.Time, error)

ParseDateTime 解析日期时间

func ParseTime

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

ParseTime ...解析时间

func ParseTimeToStr

func ParseTimeToStr(tm time.Time) string

ParseTimeToStr 格式化时间

Types

This section is empty.

Jump to

Keyboard shortcuts

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