timec

package
v1.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DateDay

func DateDay() (day int)

DateDay 获取当前的日

func DateDayFormat

func DateDayFormat() string

func DateDayMilliseconds

func DateDayMilliseconds() (r int64)

DateDayMilliseconds Time stamp for the morning of the day: in milliseconds DateDayMilliseconds 获取当日凌晨时间戳(毫秒)

func DateDayZero

func DateDayZero() (r int64)

DateDayZero 获取当日零时时间戳(秒) Time stamp of the morning of the day: unit seconds

func DayMi

func DayMi() (rr int64)

func GetDuration added in v1.0.3

func GetDuration(hoursAgo int) string

GetDuration 前几个小时时间戳

func GetTodayZero

func GetTodayZero() string

GetTodayZero ... @Description: 获取今天凌晨 @return string

func GetWeek

func GetWeek() (week int64)

GetWeek 获取今天周

func GetYesterdayZero

func GetYesterdayZero() string

GetYesterdayZero ... @Description: 获取昨天凌晨 @return string

func IsLeapYear

func IsLeapYear(year int) bool

IsLeapYear ... @Description: 是否润年 @param year @return bool

func IsMonthLastDay

func IsMonthLastDay(year, month, day int) bool

IsMonthLastDay ... @Description: 是否每个月最后一天 @param year @param month @param day @return bool

func IsToday

func IsToday(ts int64) bool

IsToday 判断时间戳是否是属于今天,秒级时间戳

func MonthlyTotal

func MonthlyTotal(year int, month int) (days int)

MonthlyTotal 输入年月 计算一个月的总数

func NextDayZeroTs

func NextDayZeroTs() int64

NextDayZeroTs 获取次日0点时间戳

func StringToInt64

func StringToInt64(s string) (t int64)

StringToInt64 标准时间格式(秒)转换为int64时间戳

func TimeFormat

func TimeFormat() string

TimeFormat ... @Description: 格式返回2021-01-06 @return string

func TimeFormat1

func TimeFormat1() string

TimeFormat1 ... @Description: 2021-01-06 11:22:31 @return string

func TimeFormat2

func TimeFormat2() string

TimeFormat2 ... @Description: 格式返回2021/01/06 @return string

func TimeFormat3

func TimeFormat3() string

TimeFormat3 ... @Description: 2021/01/06 11:22:31 @return string

func TimeFormat4

func TimeFormat4() string

TimeFormat4 ... @Description: 20210106 @return string

func TimeFormat5

func TimeFormat5() string

TimeFormat5 ... @Description: 20210106 11:22:31 @return string

func TodayLastSec

func TodayLastSec() int64

TodayLastSec 今天剩余多少秒 用于设置0点过期

func TodayZeroTs

func TodayZeroTs() int64

TodayZeroTs 获取今天0点时间戳

func UnixTimeInt64

func UnixTimeInt64(q int64) (p int64)

UnixTimeInt64 返回值int64类型 时间戳(秒): time.Now().Unix()) 时间戳(纳秒): time.Now().UnixNano()) 时间戳(毫秒): time.Now().UnixNano()/1e6) 时间戳(纳秒转换为秒) time.Now().UnixNano()/1e9)

func UnixTimeString

func UnixTimeString(q int64) (p string)

UnixTimeString 返回值string类型 时间戳(秒): time.Now().Unix()) 时间戳(纳秒): time.Now().UnixNano()) 时间戳(毫秒): time.Now().UnixNano()/1e6) 时间戳(纳秒转换为秒) time.Now().UnixNano()/1e9)

func WeekOneAndWeekSevenTime

func WeekOneAndWeekSevenTime() (one int64, seven int64)

WeekOneAndWeekSevenTime 当前周一凌晨和周日最后时间戳

Types

This section is empty.

Jump to

Keyboard shortcuts

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