diff --git a/app/lib/view-helper.coffee b/app/lib/view-helper.coffee index ce53c98..75ef5b3 100755 --- a/app/lib/view-helper.coffee +++ b/app/lib/view-helper.coffee @@ -26,3 +26,7 @@ Handlebars.registerHelper 'url', (routeName, params..., options) -> # Pass a string to turn it into a class name (lowercase + dashify) Handlebars.registerHelper 'classify', (string) -> string.toLowerCase() + +Handlebars.registerHelper 'date', (input) -> + date = if input instanceof Date then input else new Date input + return "#{date.toLocaleDateString()} - #{date.getHours()}:#{date.getMinutes()}" diff --git a/app/views/history/templates/entry.hbs b/app/views/history/templates/entry.hbs index 7893929..af0b928 100644 --- a/app/views/history/templates/entry.hbs +++ b/app/views/history/templates/entry.hbs @@ -38,7 +38,7 @@
  • - {{this.created}} + {{date this.created}}