         sameElse : 'dddd, L[,] LT'
     }
 })
+
+DATE_FORMAT = "YYYY-MM-DD"
+TIME_FORMAT = "HH:mm"
 
 # convert undefined, single category to array
 fix_categories = (categories) ->

parseEventFromForm = (form) ->
  event = form.serializeObject()
  event.categories = fix_categories(event.categories)
  return event

Template.new.events

      not_flat = Meteor.users.find("profile.admin": true).map (admin) -> admin?.profile?.events or []
      event_ids = event_ids.concat.apply(event_ids, not_flat)
    # TODO: Add sorting to EVERY Events.find, especially the category search and normal search
    Events.find({_id: {$in: event_ids}}, {sort: {from: 1}}).fetch()

# user template
Template.user.helpers
