date

package
v0.0.180 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	YKey   = "y"
	MKey   = "m"
	DKey   = "d"
	HKey   = "h"
	MinKey = "min"
	TzKey  = "tz"
)
View Source
const (
	UTCKey = "utc"
)

Variables

This section is empty.

Functions

func Idx added in v0.0.30

func Idx() []contract.IndexEntry

func IdxSrch added in v0.0.30

func IdxSrch() []contract.SearchIndexEntry

func Rules added in v0.0.24

Types

type Comp

type Comp struct {
	UTC *time.Time `json:"utc" validate:"nnpt,utc"`
}

func (*Comp) GetUTC added in v0.0.118

func (c *Comp) GetUTC() time.Time

func (*Comp) SetUTC added in v0.0.118

func (c *Comp) SetUTC(x time.Time)

type Core

type Core struct {
	contract.Dt `bson:",inline" validate:"recurse"`
}

func ApplyCore

func ApplyCore(c *Core, modifiers ...CoreOption) Core

type CoreOption

type CoreOption = contracti.CoreOption[Core]

func WithDt added in v0.0.118

func WithDt(x contract.Dt) CoreOption

type Date

type Date struct {
	Meta `bson:",inline" validate:"recurse"`
	Comp `bson:",inline" validate:"recurse"`
	Core `bson:",inline" validate:"recurse"`
}

Date represents a date optimized for handling multiple time zones, and query parameter filtering.

func Mock added in v0.0.42

func Mock() *Date

func New added in v0.0.15

func New(m Meta, cr Core) *Date

func Zero added in v0.0.122

func Zero() *Date

func (*Date) Compute added in v0.0.33

func (d *Date) Compute(ctx context.Context, op contract.Geocoder) error

type Meta

type Meta struct{}

func ApplyMeta

func ApplyMeta(m *Meta, modifiers ...MetaOption) Meta

type MetaOption

type MetaOption = contract.MetaOption[Meta]

Jump to

Keyboard shortcuts

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