mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-02 22:52:51 +02:00
tpl: Add now function
Add a now template function that returns the current time as time.Time. Also, update related docs.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
707d3cf137
commit
cabc6b3186
@@ -2146,6 +2146,7 @@ func initFuncMap() {
|
||||
"modBool": modBool,
|
||||
"mul": func(a, b interface{}) (interface{}, error) { return helpers.DoArithmetic(a, b, '*') },
|
||||
"ne": ne,
|
||||
"now": func() time.Time { return time.Now() },
|
||||
"partial": partial,
|
||||
"partialCached": partialCached,
|
||||
"plainify": plainify,
|
||||
|
Reference in New Issue
Block a user