time

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Exports = _p0.Exports{
	{N: "fixed_zone", T: _p0.Func, F: _fixed_zone},
	{N: "format", T: _p0.Func, F: _format},
	{N: "from_unix", T: _p0.Func, F: _from_unix},
	{N: "in", T: _p0.Func, F: _in},
	{N: "load_location", T: _p0.Func, F: _load_location},
	{N: "local", T: _p0.Func, F: _local},
	{N: "now", T: _p0.Func, F: _now},
	{N: "parse", T: _p0.Func, F: _parse},
	{N: "to_map", T: _p0.Func, F: _to_map},
	{N: "truncate", T: _p0.Func, F: _truncate},
	{N: "unix", T: _p0.Func, F: _unix},
	{N: "unix_nano", T: _p0.Func, F: _unix_nano},
	{N: "utc", T: _p0.Func, F: _utc},
	{N: "HOUR", T: _p0.Value, V: NewDuration(_p3.Hour)},
	{N: "MICROSECOND", T: _p0.Value, V: NewDuration(_p3.Microsecond)},
	{N: "MILLISECOND", T: _p0.Value, V: NewDuration(_p3.Millisecond)},
	{N: "MINUTE", T: _p0.Value, V: NewDuration(_p3.Minute)},
	{N: "NANOSECOND", T: _p0.Value, V: NewDuration(_p3.Nanosecond)},
	{N: "SECOND", T: _p0.Value, V: NewDuration(_p3.Second)},
}

Functions

This section is empty.

Types

type Duration

type Duration struct {
	// contains filtered or unexported fields
}

func NewDuration

func NewDuration(dur time.Duration) Duration

func (Duration) Duration

func (d Duration) Duration() time.Duration

func (Duration) EvalOp

func (d Duration) EvalOp(op nitro.Op, operand nitro.Value) (nitro.Value, error)

func (Duration) FallbackEvalOp

func (d Duration) FallbackEvalOp(op nitro.Op, left nitro.Value) (nitro.Value, error)

func (Duration) String

func (d Duration) String() string

func (Duration) Traits

func (d Duration) Traits() vm.Traits

func (Duration) Type

func (d Duration) Type() string

type Location

type Location struct {
	Location *time.Location
}

func (*Location) String

func (l *Location) String() string

func (*Location) Traits

func (l *Location) Traits() vm.Traits

func (*Location) Type

func (l *Location) Type() string

type Time

type Time struct {
	// contains filtered or unexported fields
}

func NewTime

func NewTime(t time.Time) Time

func (Time) EvalOp

func (t Time) EvalOp(op nitro.Op, operand nitro.Value) (nitro.Value, error)

func (Time) String

func (t Time) String() string

func (Time) Time

func (t Time) Time() time.Time

func (Time) Traits

func (t Time) Traits() vm.Traits

func (Time) Type

func (t Time) Type() string

Jump to

Keyboard shortcuts

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