• Parses a given duration in milliseconds into an object representing the duration in days, hours, minutes, seconds, and milliseconds.

    Parameters

    • milliseconds: number

      The duration in milliseconds to be parsed.

    Returns Result<
        Duration,
        BaseException<
            {
                message: (
                    __namedParameters: { max: number; min: number; value: number },
                ) => string;
                name: "OutOfRangeException";
            },
            { details: { max: number; min: number; value: number } },
        >,
    >

    An result of type Duration representing the parsed duration. This will return an OutOfRangeException if the input is negative.