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.
Parses a given duration in milliseconds into an object representing the duration in days, hours, minutes, seconds, and milliseconds.