gtime

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SevenDaysSeconds int64 = 604800
	OneDaySeconds    int64 = 86400
)

Variables

This section is empty.

Functions

func IsToday

func IsToday(ts int64) bool

IsToday 判断是不是今天

func IsYesterday

func IsYesterday(ts int64) bool

IsYesterday 判断是不是昨天

func Now

func Now() int64

Now 当前时间

func NowAddDays

func NowAddDays(day int64) int64

NowAddDays 当前时间+多少天

func NowDate

func NowDate() int32

NowDate 当前日期 格式 Ymd

func NowDateStr

func NowDateStr() string

NowDateStr 当前日期 格式 Ymd

func NowHour

func NowHour() int

func NowMinute

func NowMinute() int

func NowTimeStr

func NowTimeStr() string

NowTimeStr 当前日期 格式 Y-m-d H:i:s

func NowWeek

func NowWeek() int

func StartOfDay

func StartOfDay(ts int64) int64

StartOfDay 当天开始时间戳

func UnixMs

func UnixMs() int64

UnixMs 获取当前时间(毫秒)

func UnixNano

func UnixNano() int64

UnixNano 获取当前时间(纳秒)

func YesterdayDateStr

func YesterdayDateStr() string

YesterdayDateStr 昨天日期 格式 Ymd

Types

This section is empty.

Jump to

Keyboard shortcuts

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