dmason511

Results comments of dmason511

It is probably an issue more to do with my usage. This is what I have : Handlebars.RegisterHelper("formatDate", f_date); public static void f_date(TextWriter output, HelperOptions options, dynamic context, params object[]...

This is my template; {{formatDate myDateTime}} {{formatTime myDateTime}} myDateTime = "2011/07/08 07:00:00" Handlebars.RegisterHelper("formatDate", f_date); public static void f_date(TextWriter output, HelperOptions options, dynamic context, params object[] arguments) { output.Write(String.Format("{0:d}", arguments[0])); }...

Figured it out. Not sure if it is the most efficient way to do it but it worked. Handlebars.RegisterHelper("formatDate", (writer, context, args) => { DateTime dt = Convert.ToDateTime(args[0]); writer.Write(String.Format("{0:d}", dt));...

It would be greatly appreciated.