{"action":"opened","issue":{"url":"https://api.github.com/repos/jdiamond/Nustache/issues/132","repository_url":"https://api.github.com/repos/jdiamond/Nustache","labels_url":"https://api.github.com/repos/jdiamond/Nustache/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/jdiamond/Nustache/issues/132/comments","events_url":"https://api.github.com/repos/jdiamond/Nustache/issues/132/events","html_url":"https://github.com/jdiamond/Nustache/issues/132","id":358468463,"node_id":"MDU6SXNzdWUzNTg0Njg0NjM=","number":132,"title":"Custom helpers not available in Template","user":{"login":"muxa","id":128341,"node_id":"MDQ6VXNlcjEyODM0MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/128341?v=4","gravatar_id":"","url":"https://api.github.com/users/muxa","html_url":"https://github.com/muxa","followers_url":"https://api.github.com/users/muxa/followers","following_url":"https://api.github.com/users/muxa/following{/other_user}","gists_url":"https://api.github.com/users/muxa/gists{/gist_id}","starred_url":"https://api.github.com/users/muxa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muxa/subscriptions","organizations_url":"https://api.github.com/users/muxa/orgs","repos_url":"https://api.github.com/users/muxa/repos","events_url":"https://api.github.com/users/muxa/events{/privacy}","received_events_url":"https://api.github.com/users/muxa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-10T04:55:04Z","updated_at":"2018-09-10T04:55:04Z","closed_at":null,"author_association":"NONE","body":"I'm getting an error `Nustache.Compilation.CompilationException : Could not find formatDateTime Timestamp format=\"dd/MM/yyyy hh:mm tt\"`\r\n\r\nCode:\r\n```C#\r\n        [Test]\r\n        public void NustacheTest()\r\n        {\r\n            Nustache.Core.Helpers.Register(\"FormatDateTime\", FormatDateTime);\r\n            \r\n            var template = new Template();\r\n            using (var sr = new StreamReader(\"template.mustache\"))\r\n            {\r\n                template.Load(sr);\r\n            }\r\n                        \r\n            var compiled = template.Compile<TopupReceiptModel>(null);\r\n            var result = compiled(new { Timestamp = DateTime.Now });\r\n            Console.WriteLine(result);\r\n        }\r\n\r\n        public static void FormatDateTime(RenderContext context, IList<object> arguments, IDictionary<string, object> options, RenderBlock fn, RenderBlock inverse)\r\n        {\r\n            if (arguments != null && arguments.Count > 0 && arguments[0] != null && arguments[0] is DateTime)\r\n            {\r\n                DateTime datetime = (DateTime)arguments[0];\r\n                if (options != null && options.ContainsKey(\"format\"))\r\n                    context.Write(datetime.ToString(options[\"format\"] as string));\r\n                else\r\n                    context.Write(datetime.ToString());\r\n            }\r\n        }\r\n```\r\n\r\nTemplate:\r\n```Mustache\r\nTransaction Details\r\nDate & Time {{ FormatDateTime Timestamp format=\"dd/MM/yyyy hh:mm tt\"}} \r\n```\r\n\r\nIf a remove `FormatDateTime` helper from the template and just use `Timestamp` it works. \r\nCan somebody help please?"}}
{"actor":{"display_login":"muxa"}}