Converts a duration in milliseconds to a human-readable string such as
"1d 4h 32m 10s".
Sub-second values are rounded to the nearest second. Any zero-valued
components are omitted from the formatted output, so a zero-millisecond
input produces an empty string.
Parameters
ms: number
Duration in milliseconds.
locale: string = "en"
BCP 47 locale tag passed to Intl.DurationFormat. Defaults
to "en".
Converts a duration in milliseconds to a human-readable string such as
"1d 4h 32m 10s".Sub-second values are rounded to the nearest second. Any zero-valued components are omitted from the formatted output, so a zero-millisecond input produces an empty string.