import moment from 'moment'

export function fomatDate (value, format) {
  return moment(value).format(format || 'YYYY-MM-DD HH:mm:ss')
}

export function formatedDate(date) {
  if (!date) return ''
  return (date + '').replace(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/, '$1-$2-$3 $4:$5:$6')
}
