time

package module
v0.0.0-...-b160839 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = NewConfig()

DefaultConfig is a configuration with default values

View Source
var Statements = exec.StatementSet{}

Functions

This section is empty.

Types

type Config

type Config struct {
	// Default format
	DatetimeFormat string
	// If defined, now returns this parsed value
	Now *arrow.Arrow
}

func NewConfig

func NewConfig() *Config

func (*Config) Inherit

func (cfg *Config) Inherit() ext.Inheritable

type NowStmt

type NowStmt struct {
	Location *parse.Token
	TZ       string
	Format   string
	Offset   *Offset
}

func (*NowStmt) Execute

func (stmt *NowStmt) Execute(r *exec.Renderer, tag *parse.StatementBlockNode)

func (*NowStmt) Position

func (stmt *NowStmt) Position() *parse.Token

func (*NowStmt) String

func (stmt *NowStmt) String() string

type Offset

type Offset struct {
	Years   int
	Months  int
	Days    int
	Hours   int
	Minutes int
	Seconds int
}

Jump to

Keyboard shortcuts

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