Function timeStringToArray

  • Converts a time string into an array of numbers.

    Parameters

    • string: string

      The time string to be converted. The string should be in the format "HH:MM:SS".

    Returns number[]

    An array of numbers representing the hours, minutes, and seconds.

    Remarks

    This function is part of the Time Utilities library.

    Throws

    Will throw an error if the input string is not in the correct format.

    Example

    const timeArray = timeStringToArray("12:34:56");
    console.log(timeArray); // Output: [12, 34, 56]

Generated using TypeDoc