...

Package time

import "github.com/noirbizarre/gonja/ext/time"
Overview
Index

Overview ▾

Variables

DefaultConfig is a configuration with default values

var DefaultConfig = NewConfig()
var Statements = exec.StatementSet{}

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() config.Inheritable

type NowStmt

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

func (*NowStmt) Execute

func (stmt *NowStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error

func (*NowStmt) Position

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

func (*NowStmt) String

func (stmt *NowStmt) String() string

type TimeOffset

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