mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
tpl/time: Remove asTime template func mapping
This commit is contained in:
parent
3954160a21
commit
a59525b05b
1 changed files with 1 additions and 9 deletions
|
@ -32,8 +32,7 @@ func init() {
|
|||
// If no args are passed to `time`, assume namespace usage and
|
||||
// return namespace context.
|
||||
//
|
||||
// If args are passed, show a deprecation warning and attempt to
|
||||
// simulate the old "as time" behavior.
|
||||
// If args are passed, call AsTime().
|
||||
|
||||
if len(v) == 0 {
|
||||
return ctx
|
||||
|
@ -59,13 +58,6 @@ func init() {
|
|||
[][2]string{},
|
||||
)
|
||||
|
||||
ns.AddMethodMapping(ctx.AsTime,
|
||||
[]string{"asTime"},
|
||||
[][2]string{
|
||||
{`{{ (asTime "2015-01-21").Year }}`, `2015`},
|
||||
},
|
||||
)
|
||||
|
||||
return ns
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue