datetime

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadTime = errors.New("bad time")
View Source
var TimeFormats = []string{"20060102", "01/02/06"}

Functions

func DateParamToEpoch

func DateParamToEpoch(s string, tz *time.Location, now time.Time, truncate time.Duration) int64

DateParamToEpoch turns a passed string parameter into a unix epoch

func TimeTruncate

func TimeTruncate(tm time.Time, truncate time.Duration) time.Time

func TimestampTruncate

func TimestampTruncate(ts int64, truncate time.Duration) int64

func Timezone

func Timezone(qtz string) (*time.Location, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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