Merge pull request #192 from tms/date-formatting
Use consistent date formatting in date helpers
This commit is contained in:
commit
5265c0b790
|
@ -72,8 +72,7 @@ Handlebars.registerHelper 'avatar', (user, options) ->
|
||||||
|
|
||||||
Handlebars.registerHelper 'unboundDate', (property, options) ->
|
Handlebars.registerHelper 'unboundDate', (property, options) ->
|
||||||
dt = new Date(Ember.Handlebars.get(this, property, options))
|
dt = new Date(Ember.Handlebars.get(this, property, options))
|
||||||
month = Date.SugarMethods.getLocale.method().months[12 + dt.getMonth()]
|
dt.format("{d} {Mon}, {yyyy} {hh}:{mm}")
|
||||||
"#{dt.getDate()} #{month}, #{dt.getFullYear()} #{dt.getHours()}:#{dt.getMinutes()}"
|
|
||||||
|
|
||||||
Handlebars.registerHelper 'editDate', (property, options) ->
|
Handlebars.registerHelper 'editDate', (property, options) ->
|
||||||
dt = Date.create(Ember.Handlebars.get(this, property, options))
|
dt = Date.create(Ember.Handlebars.get(this, property, options))
|
||||||
|
|
Loading…
Reference in New Issue