import Ember from 'ember'

# This function receives the params `params, hash`
l = ([date]) ->
  return '' unless date
  return date if typeof date is 'string'
  return date.format('ll') if date._isAMomentObject
  date.toISOString().substring(0,10)

LHelper = Ember.Helper.helper l

export { l }

export default LHelper
