times

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: Apache-2.0 Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTime added in v0.14.0

func ParseTime(value string) (result time.Time, err error)

Types

type DateRange

type DateRange struct {
	// Beg
	// @title Beg
	// @description `2006-01-01`
	Beg json.Date `json:"beg"`
	// End
	// @title End
	// @description `2006-01-01`
	End json.Date `json:"end"`
}

DateRange @title DateRange @description `['2006-01-01', '2006-01-01')`

func NewDateRange added in v0.14.0

func NewDateRange(left json.Date, right json.Date) (v *DateRange)

func (*DateRange) IsZero

func (dr *DateRange) IsZero() (ok bool)

type TimeRange

type TimeRange struct {
	// Beg
	// @title Beg
	// @description `2006-01-01T15:04:06`
	Beg time.Time `json:"beg"`
	// End
	// @title End
	// @description `2006-01-01T15:04:06`
	End time.Time `json:"end"`
}

TimeRange @title TimeRange @description `['2006-01-01T15:04:06', '2006-01-01T15:04:06')`

func NewTimeRange added in v0.14.0

func NewTimeRange(left time.Time, right time.Time) (v *TimeRange)

func (*TimeRange) IsZero

func (tr *TimeRange) IsZero() (ok bool)

Jump to

Keyboard shortcuts

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