datetime

package
v1.2.30 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ISO8601Date defines an ISO 8601 Date format
	ISO8601Date = "2006-01-02"
	// ISO8601Hour defines an ISO 8601 Date format including the hour
	ISO8601Hour = "2006-01-02T15Z07:00"
	// ISO8601Minute defines an ISO 8601 Date format including the hour and the minute
	ISO8601Minute = "2006-01-02T15:04Z07:00"
	// ISO8601Second defines an ISO 8601 Date format including the hour, the minute and the second
	ISO8601Second = time.RFC3339
	// ISO8601Nano defines an ISO 8601 Date format including the hour, the minute, the second and the nanosecond
	ISO8601Nano = time.RFC3339Nano
)

Variables

View Source
var (
	// ISO8601Formats contains a slice of all declared ISO 8601 date formats
	ISO8601Formats = []string{
		ISO8601Date,
		ISO8601Hour,
		ISO8601Minute,
		ISO8601Second,
		ISO8601Nano,
	}
)

Functions

func ISO8601

func ISO8601(s string) (time.Time, error)

ISO8601 is a utility function that tries all of the date and date+time formats of ISO8601

func ValidSlowQueryThreshold

func ValidSlowQueryThreshold(s string) bool

ValidSlowQueryThreshold Validates the given string according to what ES threshold values are expected spec.

Types

This section is empty.

Jump to

Keyboard shortcuts

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