parsing

package
v0.0.0-...-2d27036 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Duration

func Duration(dur time.Duration) (format string)

Duration - convert golang time duration to string format DD:HH:MM:SS

func InBetweenInt

func InBetweenInt(i, min, max int) bool

InBetweenInt -

func InBetweenInt64

func InBetweenInt64(i, min, max int64) bool

InBetweenInt64 -

func InterfaceToInt

func InterfaceToInt(data interface{}) (val int)

InterfaceToInt -

func TimeStringDateOnly

func TimeStringDateOnly(dur time.Time) (format string)

TimeStringDateOnly -

func TimeStringTimeOnly

func TimeStringTimeOnly(dur time.Time) (format string)

TimeStringTimeOnly -

func TimeStringWitLongDate

func TimeStringWitLongDate(dur time.Time) (format string)

TimeStringWitLongDate -

func TimeStringWithDate

func TimeStringWithDate(dur time.Time) (format string)

TimeStringWithDate -

func TimeToString

func TimeToString(s time.Time) (ts string)

TimeToString -

func ToFixed

func ToFixed(num float64, precision int) float64

ToFixed -

func UnixTime

func UnixTime(t int64) (ts time.Time)

UnixTime - convert unix time to golang time format

Types

type DurationUnit

type DurationUnit struct {
	Day    int
	Hour   int
	Minute int
	Second int
}

DurationUnit -

func DurationToUnit

func DurationToUnit(dur time.Duration) (format DurationUnit)

DurationToUnit -

type TimeString

type TimeString struct {
	Date time.Time
	// contains filtered or unexported fields
}

TimeString -

func NewTimeString

func NewTimeString(tt time.Time) *TimeString

NewTimeString -

func (*TimeString) Output

func (cc *TimeString) Output() (sr string)

Output -

func (*TimeString) WithDate

func (cc *TimeString) WithDate(sp, sp2 string) *TimeString

WithDate -

func (*TimeString) WithLongDate

func (cc *TimeString) WithLongDate(sp, sp2 string) *TimeString

WithLongDate -

func (*TimeString) WithMilliSecond

func (cc *TimeString) WithMilliSecond() *TimeString

WithMilliSecond -

func (*TimeString) WithTime

func (cc *TimeString) WithTime() *TimeString

WithTime -

Jump to

Keyboard shortcuts

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