lib/hapiCrudHelper.js
function formatDate (payload, schema) {
  _.forEach(schema, function(v, k) {
    if (v !== null && v._type === 'date') {
      if (payload[k] !== null) {
        payload[k] = new Date(payload[k])
      }
    }
  })
}
function formatDate (payload, schema) {
  _.forEach(schema, function(v, k) {
    if (v !== null && v._type === 'date') {
      if (payload[k] !== null) {
        payload[k] = new Date(payload[k])
      }
    }
  })
}
Applies simple to-date conversion for every date property of a payload, as defined in the schema provided.