Humanize a duration object into a human-readable string.
Optional
const duration = { years: 1, months: 2, days: 3, hours: 4, minutes: 5, seconds: 6 };humanizeDuration(duration) // => "1 year, 2 months, 3 days, 4 hours, 5 minutes and 6 seconds" Copy
const duration = { years: 1, months: 2, days: 3, hours: 4, minutes: 5, seconds: 6 };humanizeDuration(duration) // => "1 year, 2 months, 3 days, 4 hours, 5 minutes and 6 seconds"
const duration = { seconds: 4000 };humanizeDuration(duration) // => "1 hour, 6 minutes and 40 seconds" Copy
const duration = { seconds: 4000 };humanizeDuration(duration) // => "1 hour, 6 minutes and 40 seconds"
Humanize a duration object into a human-readable string.