now

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultFormat       = "2006-01-02 15:04:05"
	Format              = "2006-01-02 15:04:05"
	GoFormat            = "2006-01-02 15:04:05.999999999"
	DateFormat          = "2006-01-02"
	FormattedDateFormat = "Jan 2, 2006"
	TimeFormat          = "15:04:05"
	HourMinuteFormat    = "15:04"
	HourFormat          = "15"
	DayDateTimeFormat   = "Mon, Aug 2, 2006 3:04 PM"
	CookieFormat        = "Monday, 02-Jan-2006 15:04:05 MST"
	RFC822Format        = "Mon, 02 Jan 06 15:04:05 -0700"
	RFC1036Format       = "Mon, 02 Jan 06 15:04:05 -0700"
	RFC2822Format       = "Mon, 02 Jan 2006 15:04:05 -0700"
	RFC3339Format       = "2006-01-02T15:04:05-07:00"
	RSSFormat           = "Mon, 02 Jan 2006 15:04:05 -0700"
)

GoTime the different string formats for go dates

Variables

This section is empty.

Functions

func Add

func Add(begin time.Time, tm string) (end time.Time)

Add add a tm time to the begin time

func GetMonTS

func GetMonTS(m ...bool) (int64, error)

GetMonTS get the timestamp of the monday

func GetMonthTS added in v0.40.2

func GetMonthTS() (int64, error)

GetMonthTS returns the timestamp of the first day of the month

func Timestamp

func Timestamp() int64

Timestamp get the timestamp of now

func TimestampNano

func TimestampNano() int64

TimestampNano get the nano timestamp of now

Types

This section is empty.

Jump to

Keyboard shortcuts

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