Function formatIntToTime

  • 将后台传过来的时间字符串转换为分号分隔显示的时间字符串

    Parameters

    • time: string | number | Date
    • withMillisecond: boolean = true

    Returns string

    formatIntToTime(140151); // => 14:01:51
    formatIntToTime(140151559); // => 14:01:51.559
    formatIntToTime(140151559, false); // => 14:01:51
    formatIntToTime(80151); // => 08:01:51
    formatIntToTime(80151559); // => 08:01:51.559
    formatIntToTime(80151559, false); // => 08:01:51