helps

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const OneDaySec = int64(86400)

Variables

This section is empty.

Functions

func CopyPoint

func CopyPoint[T any](m T) T

func Duration

func Duration(s, e int64) string

func Duration2

func Duration2(start, end int64) string

func DurationSecondsOfMonth

func DurationSecondsOfMonth(s int64) (int64, int64)

func FirstSecond

func FirstSecond(t time.Time) int64

func FirstSecond2

func FirstSecond2(s int64) int64

func FormatDate

func FormatDate(ts int64) string

func FormatTime

func FormatTime(ts int64) string

func GetFirstDateOfMonth

func GetFirstDateOfMonth(d time.Time) time.Time

GetFirstDateOfMonth 获取传入的时间所在月份的第一天,即某月第一天的0点。如传入time.Now(), 返回当前月份的第一天0点时间。

func GetLastDateOfMonth

func GetLastDateOfMonth(d time.Time) time.Time

GetLastDateOfMonth 获取传入的时间所在月份的最后一天,即某月最后一天的23:59:59。如传入time.Now(), 返回当前月份的最后一天0点时间。

func GetZeroTime

func GetZeroTime(d time.Time) time.Time

GetZeroTime 获取某一天的0点时间

func JSONArgs

func JSONArgs(r io.Reader, v schema.ISchema) error

func NonceStr

func NonceStr() string

func SafePage

func SafePage[T Integer](i T) T

func Str2Time

func Str2Time(str string) time.Time

func StrToTime

func StrToTime(str string) int64

func TodayFirstSecond

func TodayFirstSecond() int64

Types

type Complex

type Complex interface {
	~complex64 | ~complex128
}

type FieldType

type FieldType interface {
	Integer | string
}

type Float

type Float interface {
	~float32 | ~float64
}

type Integer

type Integer interface {
	Signed | Unsigned
}

type Ordered

type Ordered interface {
	Integer | Float | ~string
}

type Signed

type Signed interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64
}

type Unsigned

type Unsigned interface {
	~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
}

Jump to

Keyboard shortcuts

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