coredatetime

package
v0.0.0-...-1887219 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName is the prefix given to all the functions in this module.
	ModuleName = "datetime"
)

Variables

This section is empty.

Functions

func Weekday

func Weekday(input []types.Value) (types.Value, error)

Weekday returns the lowercased day of the week corresponding to the input time. The time is the number of seconds since the epoch, and matches what comes from our Now function.

Types

type DateTimeFact

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

DateTimeFact is a fact which returns the current date and time.

func (*DateTimeFact) Close

func (obj *DateTimeFact) Close() error

Close runs some shutdown code for this fact and turns off the stream.

func (*DateTimeFact) Info

func (obj *DateTimeFact) Info() *facts.Info

Info returns some static info about itself.

func (*DateTimeFact) Init

func (obj *DateTimeFact) Init(init *facts.Init) error

Init runs some startup code for this fact.

func (*DateTimeFact) Stream

func (obj *DateTimeFact) Stream() error

Stream returns the changing values that this fact has over time.

Jump to

Keyboard shortcuts

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