export function dealWithDateTime(_param) {
  if (_param === '' || _param === null || _param === undefined) {
    return '';
  }
  let date = new Date(_param);
  let year = date.getFullYear();
  let month = date.getMonth();
  month = month + 1;
  if (month < 10) {
    month = '0' + month;
  }
  let day = date.getDate();
  if (day < 10) {
    day = '0' + day;
  }
  let hour = date.getHours();
  if (hour < 10) {
    hour = '0' + hour;
  }
  let minute = date.getMinutes();
  if (minute < 10) {
    minute = '0' + minute;
  }
  let second = date.getSeconds();
  if (second < 10) {
    second = '0' + second;
  }
  return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
}

export function dealWithMonth(_param) {
  if (_param === '' || _param === null || _param === undefined) {
    return '';
  }
  let date = new Date(_param);
  let year = date.getFullYear();
  let month = date.getMonth();
  month = month + 1;
  if (month < 10) {
    month = '0' + month;
  }
  return year + '-' + month;
}