formatISODuration
import { formatISODuration } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Format the given duration as ISO 8601 string
const result = formatISODuration({
years: 39,
months: 2,
days: 20,
hours: 7,
minutes: 5,
seconds: 0
})
//=> 'P39Y2M20DT0H0M0S'