Function timeArrayToString

  • Converts an array of time values into a string representation.

    Parameters

    • array: number[]

      The array of time values to convert. Each value should represent a unit of time in the order of hours, minutes, seconds, and milliseconds.

    • msDelimiter: string = '.'

      The delimiter to use between the seconds and milliseconds. Defaults to '.'.

    Returns string

    A string representation of the time values in the format 'HH:MM:SS.MS'.

    Throws

    Will throw an error if the array is not a valid time array.

    Example

    const timeArray = [12, 30, 15, 500];
    const result = timeArrayToString(timeArray);
    console.log(result); // Outputs: '12:30:15.500'

Generated using TypeDoc