timeutils

package
v0.20.4 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

View Source
const KeptnTimeFormatISO8601 = "2006-01-02T15:04:05.000Z"

Variables

This section is empty.

Functions

func GetKeptnTimeStamp

func GetKeptnTimeStamp(timestamp time.Time) string

GetKeptnTimeStamp formats a given timestamp into the format used by Keptn which is following the ISO 8601 standard

func GetStartEndTime

func GetStartEndTime(params GetStartEndTimeParams) (*time.Time, *time.Time, error)

GetStartEndTime parses the provided start date, end date and/or timeframe

func ParseTimestamp added in v0.11.0

func ParseTimestamp(timestamp string) (*time.Time, error)

Types

type GetStartEndTimeParams

type GetStartEndTimeParams struct {
	StartDate  string
	EndDate    string
	Timeframe  string
	TimeFormat string
}

func (*GetStartEndTimeParams) Validate

func (params *GetStartEndTimeParams) Validate() error

Jump to

Keyboard shortcuts

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