The current implementation of the ordinalSuffix function in the default English locale assumes all numbers ending with 1, 2, or 3 to have "st", "nd", and "rd" suffices respectively leaving all remaining numbers with a "th" suffix.
const ordinalSuffix = (number) =>
number + ({ 1: "st", 2: "nd", 3: "rd" }[number[number.length - 1]] || "th");
Quokka sample:
However, this isn't a valid assumption as numbers 11, 12, and 13 (as well as 111, 112, 113, 1011, 1012, 1013, and so on) should all have the "th" suffix.
Therefore, the function should be applying special treatment to any numbers ending with 11, 12, and 13.
const ordinalSuffixProper = (number) =>
number +
((!["11", "12", "13"].find((n) => number.endsWith(n)) &&
{ 1: "st", 2: "nd", 3: "rd" }[number[number.length - 1]]) ||
"th");
Quokka sample: