timer

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: Zlib Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentMS

func CurrentMS() int64

func CurrentS

func CurrentS() int64

func CurrentTime

func CurrentTime() string

func DateStringToTime

func DateStringToTime(d string) time.Time

日期字符串转换成时间 ("2006-01-02" to time.Time)

func DateTimeStringToTime

func DateTimeStringToTime(dt string) time.Time

日期+时间字符串转换成时间 ("2006-01-02 15:04:05" to time.Time)

func Get24Time

func Get24Time(t time.Time) time.Time

获取当日晚上24点(次日0点)的时间

func Get24TimeUnix

func Get24TimeUnix(t time.Time) int64

获取当日晚上24点(次日0点)的时间戳

func GetNowDateString

func GetNowDateString() string

获取当前时间的日期字符串("2006-01-02")

func GetNowString

func GetNowString() string

获取当前的时期+时间字符串

func GetNowTimeUnix

func GetNowTimeUnix() int64

获取当前时间的时间戳 return:1464059756

func GetTimeUnix

func GetTimeUnix(t time.Time) int64

获取时间戳 return:1464059756

func GetToday24Time

func GetToday24Time() time.Time

获取今天晚上24点(次日0点)的时间

func GetToday24TimeUnix

func GetToday24TimeUnix() int64

获取今天晚上24点(次日0点)的时间戳

func IsWeekend

func IsWeekend(t time.Time) bool

是否是周末

func TimeToDate

func TimeToDate(t time.Time) string

时间转换成日期字符串 (time.Time to "2006-01-02")

func TimeToDateTime

func TimeToDateTime(t time.Time) string

时间转换成日期+时间字符串 (time.Time to "2006-01-02 15:04:05")

func TodayStringToTime

func TodayStringToTime(dt string) time.Time

时间字符串转换成时间 ("15:04:05" to time.Time)

Types

This section is empty.

Jump to

Keyboard shortcuts

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