datetime

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package datetime parses the date values accepted by query parameters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDateMath

func IsDateMath(value string) bool

IsDateMath reports syntax OpenSearch evaluates relative to its request time.

Types

type Value

type Value struct {
	Time     time.Time
	DateOnly bool
	DateMath bool
}

Value is a parsed instant plus the syntax that affects range semantics.

func Parse

func Parse(raw string, now time.Time) (Value, error)

Parse accepts OpenSearch date math and the absolute formats supported by query date parameters. now is injected so one paged execution has one range.

Jump to

Keyboard shortcuts

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