datetimeutil

package
v0.0.0-...-09938fb Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentTime

func GetCurrentTime() time.Time

func GetCurrentTimeStr

func GetCurrentTimeStr() string

func GetCurrentTimeUnix

func GetCurrentTimeUnix() int64

func GetCurrentTimeUnixNano

func GetCurrentTimeUnixNano() int64

func GetDateBeforeToday

func GetDateBeforeToday(days int) time.Time

func GetDateStrBeforeToday

func GetDateStrBeforeToday(days int) string

func GetDatetimeBefore

func GetDatetimeBefore(datetime time.Time, seconds int) time.Time

func GetDatetimeBeforeNow

func GetDatetimeBeforeNow(seconds int) time.Time

func GetDatetimeDiff

func GetDatetimeDiff(begin time.Time, end time.Time) int64

func GetDatetimeDiffNano

func GetDatetimeDiffNano(begin time.Time, end time.Time) int64

func GetDatetimeDuration

func GetDatetimeDuration(s string) time.Time

Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

func GetDatetimeFromStr

func GetDatetimeFromStr(datetimeStr string) time.Time

func GetDatetimeStrBeforeNow

func GetDatetimeStrBeforeNow(seconds int) string

func GetStrFromDatetime

func GetStrFromDatetime(datetime time.Time) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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