vtime

package
v0.0.0-...-4d456dd Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParserTimestampMs

func ParserTimestampMs(timestampMs int64) time.Time

func ParserTimestampNs

func ParserTimestampNs(timestampNs int64) time.Time

func ParserTimestampS

func ParserTimestampS(timestampS int64) time.Time

Types

type Time

type Time struct {
	Format string    // timestamp or time layout
	Unit   string    // if format is timestamp it can be ms ns s ..
	Value  string    // a string formatted time value
	Time   time.Time // the standard time
	TZ     string    // if don't set timezoo
}

func (*Time) FromRelativeTime

func (t *Time) FromRelativeTime(relative string) error

func (*Time) FromTime

func (t *Time) FromTime(stdTime time.Time)

* parser time to vtime

func (*Time) Parser

func (t *Time) Parser() (time.Time, error)

Parser VTime Format to time

func (*Time) ToSpecFormat

func (t *Time) ToSpecFormat(format string) string

func (*Time) Transfer

func (t *Time) Transfer(to *Time) error

* transfer a time format to another format

Jump to

Keyboard shortcuts

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