time

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Namespace

type Namespace struct{}

Namespace provides template functions for the "time" namespace.

func New

func New() *Namespace

New returns a new instance of the time-namespaced template functions.

func (*Namespace) AsTime

func (ns *Namespace) AsTime(v interface{}) (interface{}, error)

AsTime converts the textual representation of the datetime string into a time.Time interface.

func (*Namespace) Format

func (ns *Namespace) Format(layout string, v interface{}) (string, error)

Format converts the textual representation of the datetime string into the other form or returns it of the time.Time value. These are formatted with the layout string

func (*Namespace) Now

func (ns *Namespace) Now() _time.Time

Now returns the current local time.

Jump to

Keyboard shortcuts

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