utils

package
v0.6.19 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanUpdate

func CanUpdate(t time.Time) bool

CanUpdate t 时间可以更新的时间, 调整到对应时分秒

func CanUpdateTime

func CanUpdateTime() time.Time

CanUpdateTime 是否可以更新

func DateZero

func DateZero(t time.Time) time.Time

DateZero t 的0点0分0秒

func DifferDays

func DifferDays(t1, t2 time.Time) int

DifferDays 计算天数差 从 t1 回到 t2 需要多少天

func KLineRequireDays

func KLineRequireDays(currentDate, lastDay time.Time) int

func NextUpdateTime

func NextUpdateTime(t time.Time) time.Time

NextUpdateTime 下一个可以更新的日期

func ParseTime

func ParseTime(timestr string) (time.Time, error)

ParseTime 解析时间差

func SliceWantFloat

func SliceWantFloat(got, want []float64) bool

func UnixTime

func UnixTime(timestamp int64) time.Time

UnixTime 毫秒数转time.Time

func WantFloat

func WantFloat(got, want float64) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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