From a119ef693faf5dc346fec78ca8a18948ec65a993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 20 May 2017 11:41:43 +0300 Subject: tpl/time: Re-add the time example --- tpl/time/init.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tpl/time') diff --git a/tpl/time/init.go b/tpl/time/init.go index 760986e5a..d0c774a0f 100644 --- a/tpl/time/init.go +++ b/tpl/time/init.go @@ -58,6 +58,13 @@ func init() { [][2]string{}, ) + ns.AddMethodMapping(ctx.AsTime, + nil, + [][2]string{ + {`{{ (time "2015-01-21").Year }}`, `2015`}, + }, + ) + return ns } -- cgit v1.2.3