npm / pretty-ms
pretty-ms
What changed in pretty-ms 9 to 10, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
7 breaking11 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpretty-ms 1017 changes
Breaking changes 7
After a year, days are padded to 3 digits so their width does not change between 9 and 100 days.
With hideSeconds, colonNotation always shows hours; a one-minute duration now displays as 0:01.
unitCount is ignored with colonNotation, so dropping a field no longer changes the meaning of the remaining fields.
Fractional numbers are read to 15 significant digits, while integer numbers and bigints are exact at any size.
Fractional seconds no longer round up into the next unit; for example, 1999.999999 now displays as 1.9s.
Decimal milliseconds now round half up correctly; 1.005 with two digits displays as 1.01ms.
Node.js 22 is now required.
Fixes and other changes 10
Sub-millisecond fields are corrected, including phantom nanoseconds and inaccurate microsecond values.
For a duration under a minute, hideSeconds now shows the seconds instead of 0ms.
Days, hours, and minutes are corrected for very large durations.
Values outside 0–100 no longer throw a RangeError, and NaN no longer displays as NaNs.
Negative zero, such as -0ms, is no longer shown.
A nonzero duration is no longer displayed as 0ms.
Seconds retain precision for large durations and high digit counts.
Values outside 0–100 no longer throw a RangeError, and NaN no longer displays as NaNs.
When seconds cannot show the value, subSecondsAsDecimals no longer displays 0ms; 50 now displays as 50ms.
unitCount: NaN no longer returns an empty string.
pretty-ms 91 changes
Fixes and other changes 1
Prevents milliseconds from rounding up to 1000ms.