End of day commit

This commit is contained in:
2014-07-21 20:31:11 +02:00
parent 2fec0b3bb6
commit 8ca59c4e38
27 changed files with 258 additions and 94 deletions
@@ -1,5 +1,6 @@
Ember.Handlebars.helper 'time', (time, params..., options = {})->
return '' unless time
time = new Date(time) if typeof(time) is "string"
iso = time.toISOString()
tag = if options.bare then iso else $("<span data-time=\"#{iso}\"></span>").text(moment(iso).format(options.format || 'dd D MMM HH:MM')).get(0).outerHTML
new Handlebars.SafeString tag