import { parse } from './fecha';
import { zhCN } from '../../i18n/time-locale';
export default function parseDate(date, mask, locale) {
    if (mask === void 0) { mask = 'default'; }
    if (locale === void 0) { locale = zhCN; }
    if (date instanceof Date) {
        return new Date(date.getTime());
    }
    if (typeof date === 'number') {
        return new Date(date);
    }
    mask = mask || 'default';
    var ret = parse(date, mask, locale);
    if (!ret) {
        return null;
    }
    return ret;
}
