jtime

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//Length10Second 10位 精确到秒
	Length10Second = TimestampLength(10)
	//Length13Milli 13位 精确到毫秒(默认)
	Length13Milli = TimestampLength(13)
	//Length16Micro 16位 精确到微妙
	Length16Micro = TimestampLength(16)
	//Length19Nano 19位 精确到纳秒
	Length19Nano = TimestampLength(19)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Jtime

type Jtime struct {
	Format string
	Tslen  TimestampLength
	// contains filtered or unexported fields
}

func Now

func Now() *Jtime

Now 将当前时间转为 Jtime

func TextToJtime

func TextToJtime(format, timetext string) *Jtime

TextToJtime time.Time 转为 JTime

func TimeToJtime

func TimeToJtime(tm time.Time) *Jtime

TimeToJtime time.Time 转为 JTime

func (Jtime) ToTimeText

func (j Jtime) ToTimeText() string

ToTimeText 时间 根据 format ,转为 文本输出

func (Jtime) ToTimestamp

func (j Jtime) ToTimestamp() int64

ToTimestamp 时间 转为 Timestamp 时间戳 输出

func (*Jtime) Totime

func (j *Jtime) Totime() time.Time

Totime :JTime 转为 time.Time

type TimestampLength

type TimestampLength int

TimestampLength 时间戳长度

Jump to

Keyboard shortcuts

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