/**
 * Program: date filter
 * Author: SDL
 * Description: date filter
 */
import moment from 'moment';
import { SDLUtil } from '@/utils';

export default (dateStr, formatStr = SDLUtil.getMsgProp('data-format.date.ymd')) => {
  if (dateStr) {
    return moment(dateStr).format(formatStr);
  }
  return dateStr;
};
