import Ember from 'ember'

# This function receives the params `params, hash`
date = ([date], options={}) ->
  return '' unless date
  return date if typeof date is 'string'
  date = moment(date) unless date._isAMomentObject
  date.format(options.format || 'll')

DateHelper = Ember.Helper.helper date

export { date }

export default DateHelper

