timeutil

package
v0.0.0-...-a69402d Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Start time.Time

Functions

func EndTick

func EndTick() float32

func EndTickDt

func EndTickDt() time.Duration

func GetBeforeMonthRange

func GetBeforeMonthRange(now time.Time, interval int) (firstOfMonth, firstOfNextMonth time.Time, lastDayWeek time.Weekday, lastDay int)

func GetNextMonthRange

func GetNextMonthRange(now time.Time, interval int) (firstOfMonth, firstOfNextMonth time.Time, lastDayWeek time.Weekday, lastDay int)

func MsTimestamp2DayHourStr

func MsTimestamp2DayHourStr() string

func MsTimestamp2DayMiniuteStr

func MsTimestamp2DayMiniuteStr() string

func MsTimestamp2DayStr

func MsTimestamp2DayStr() string

func MsTimestamp2MicroStr

func MsTimestamp2MicroStr() string

func MsTimestamp2MilliStr

func MsTimestamp2MilliStr() string

func MsTimestamp2MonthStr

func MsTimestamp2MonthStr() string

func MsTimestamp2NanoStr

func MsTimestamp2NanoStr() string

func MsTimestamp2SecondStr

func MsTimestamp2SecondStr() string

func MsTimestamp2Time

func MsTimestamp2Time(stamp int64) time.Time

毫秒转time对象

func MsTimestampNow

func MsTimestampNow() int64

毫秒

func MsTimestampStr2Time

func MsTimestampStr2Time(stampStr string) (time.Time, error)

func NanoTimestamp2Time

func NanoTimestamp2Time(stamp int64) time.Time

func ParseTime

func ParseTime(layout, value string) (time.Time, error)

func SecondTimestampNow

func SecondTimestampNow() int64

SecondTimestampNow 当前秒时间戳

func StartTick

func StartTick()

func Timestamp2Time

func Timestamp2Time(stamp int64) time.Time

func WeekRange

func WeekRange(now time.Time) (weekStart, weekEnd time.Time)

this monday to next monday

Types

This section is empty.

Jump to

Keyboard shortcuts

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