Function timeStringToIntUnsafe

  • Converts a time string to an integer representation. This function is unsafe because it does not perform any validation on the input string. It assumes that the input string is a valid time string.

    Parameters

    • string: string

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

    Returns number

    The integer representation of the time string.

    Remarks

    This function is part of the Time Utilities library.

    Throws

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

    Example

    const timeString = "12:34:56";
    const timeInt = timeStringToIntUnsafe(timeString);
    console.log(timeInt); // Expected output: 45296

Generated using TypeDoc