API Core - v1.5.0
    Preparing search index...

    Function formatDurationHuman

    • Render a Temporal.Duration in English diagnostic form, with adaptive units: sub-minute windows render as seconds (e.g. "20 seconds") so a short Retry-After never rounds to a misleading "0 minutes"; longer windows render as "M minutes, S seconds".

      Intended for log lines and developer-facing error messages — not for presentation in a localized UI. Consumers that need localized output should read the underlying Temporal.Duration and format it with Intl.DurationFormat or their own i18n framework.

      Parameters

      Returns string

      The formatted, English-diagnostic string.