import moment from "moment";
/**
 * 
 * @param time 时间字符串
 * @returns 
 */
export const filterTime = (time: any) => {
    if (!time) {
        return ''
    }
    return moment(new Date(time).getTime()).format('YYYY-MM-DD HH:mm:ss')
}

/**
 * 
 * @param time 时间字符串
 * @returns 
 */
export const filterTimeY_M_D = (time: any) => {
    if (!time) {
        return ''
    }
    return moment(new Date(time).getTime()).format('YYYY-MM-DD')
}

/**
 * 分秒
 * @returns 
 */
export const getM_S = () => {
    return moment(new Date().getTime()).format('mm:ss')
}