aktime

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CstOneWeekDays  = 7                //一周7天
	CstOneWeekHours = 7 * 24           //一周多少小时
	CstOneWeekMins  = 7 * 24 * 60      //一周多少分钟
	CstOneWeekSecs  = 7 * 24 * 60 * 60 //一周多少秒

	CstOneDayHours = 24           //一天多少小时
	CstOneDayMins  = 24 * 60      //一天多少分钟
	CstOneDaySecs  = 24 * 60 * 60 //一天多少秒

	CstOneHourMins = 60      //一个小时多少分钟
	CstOneHourSecs = 60 * 60 //一个小时多少秒

	CstOneMinSecs = 60 //一分钟多少秒
)

Variables

This section is empty.

Functions

func InitAkTime

func InitAkTime(redconn redis.Conn)

func IsCross24Hour

func IsCross24Hour(t1 int64, t2 int64) (yes bool)

----------------------- HOUR ---------------------------- check cross 24 hours for diff cross day.

func IsCrossDay4Zero

func IsCrossDay4Zero(t1 int64, t2 int64) (yes bool)

----------------------- DAY ---------------------------- check cross day for zero(0/24) clock.

func IsCrossDay4ZeroNow

func IsCrossDay4ZeroNow(t1 int64) (yes bool)

check cross "now" day for zero(0/24) clock

func IsCrossHours

func IsCrossHours(t1 int64, t2 int64, hours int64) (yes bool)

check cross hours.

func IsCrossMins

func IsCrossMins(t1 int64, t2 int64, mins int64) (yes bool)

----------------------- Min ---------------------------- check cross mins.

func IsCrossMonth

func IsCrossMonth(t1 int64, t2 int64) (yes bool)

check cross month for compare time

func IsCrossMonth4Now

func IsCrossMonth4Now(t1 int64) (yes bool)

----------------------- MONTH ---------------------------- check cross month for now time.

func IsCrossSecs

func IsCrossSecs(t1 int64, t2 int64, secs int64) (yes bool)

----------------------- Second ---------------------------- check cross seconds.

func IsCrossYear

func IsCrossYear(t1 int64, t2 int64) (yes bool)

check cross year for compare time

func IsCrossYear4Now

func IsCrossYear4Now(t1 int64) (yes bool)

----------------------- YEAR ---------------------------- check cross year for now time.

func Now

func Now() 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