vremel
Version:
JavaScript date utility library for Temporal API
11 lines • 406 B
JavaScript
import { compare } from "./_compare.js";
/**
* Returns the longest of the given durations.
* @param durations array of durations
* @param options the options passed to `Temporal.Duration.compare`
* @returns the longest of the duration
*/
export function longest(durations, options) {
return durations.reduce((a, b) => (compare(a, b, options) === -1 ? b : a));
}
//# sourceMappingURL=longest.js.map