Add datetime_utility.js.coffee

This commit is contained in:
Alfredo Sumaran 2016-04-07 12:00:19 -05:00
parent 088368ae4d
commit b19ccdeed4

View file

@ -0,0 +1,15 @@
((w) ->
w.gl ?= {}
w.gl.utils ?= {}
w.gl.utils.formatDate = (datetime) ->
dateFormat(datetime, 'mmm d, yyyy h:MMtt Z')
w.gl.utils.updateFormatDate = ($timeagoEls) ->
$timeagoEls.each( ->
$el = $(@)
$el.attr('title', gl.utils.formatDate($el.attr('datetime')))
)
) window