times

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TmFmtWithMS1 = "2006-01-02 15:04:05.000"
	TmFmtWithMS2 = "2006/01/02 15:04:05.000"
	TmFmtWithS1  = "2006-01-02 15:04:05"
	TmFmtWithS2  = "2006/01/02 15:04:05"
	TmFmtWithD1  = "2006-01-02"
	TmFmtWithD2  = "2006/01/02"
)

Variables

View Source
var (
	Locate, _ = time.LoadLocation("Asia/Shanghai")
)

Functions

func FormatSubTime

func FormatSubTime(t string) string

func String2Time

func String2Time(s string, tmFmt string) (time.Time, error)

func String2TimeD added in v0.1.7

func String2TimeD(s string) (time.Time, error)

func String2TimeS added in v0.1.7

func String2TimeS(s string) (time.Time, error)

func SubMinuteByString

func SubMinuteByString(t string) (float64, error)

func SubMinuteByTime

func SubMinuteByTime(t time.Time) float64

Types

This section is empty.

Jump to

Keyboard shortcuts

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