• 日期格式转换

    Parameters

    • time: undefined | null | string | number | Date

      需要转换的时间

    • fmt: string

      需要转换的格式 如 yyyy-MM-dd、yyyy-MM-dd HH:mm:ss

    Returns string

    Example

    formatTime(new Date(), 'yyyy-MM-dd')
    

Generated using TypeDoc