timeutil

package module
v0.0.0-...-ff5648c Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LAYOUT    = "2006-01-02 15:04:05"
	YMDLayout = "20060102"
)

Variables

This section is empty.

Functions

func CSTLayoutString

func CSTLayoutString() string

返回 "2006-01-02 15:04:05" 格式的时间

func CSTLayoutStringToUnix

func CSTLayoutStringToUnix(date string) (int64, error)

CSTLayoutStringToUnix 返回 unix 时间戳 2020-01-24 21:11:11 => 1579871471

func ParseCSTInLocation

func ParseCSTInLocation(date string) (time.Time, error)

ParseCSTInLocation 格式化时间

func SubInLocation

func SubInLocation(t time.Time) float64

SubInLocation 计算时间差

func YMDLayoutInt64

func YMDLayoutInt64(t time.Time) int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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