unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.64k stars 267 forks source link

fix: fix the textual representation of an ordinal number #5135

Closed etorreborre closed 2 days ago

etorreborre commented 2 days ago

This PR fixes #5134.

Overview

The fix consists in making sure that any number ending with 11, 12, or 13 gets a th suffix.

Implementation notes

I have moved that function to the Unison.Util.Text module in order to unit test it alongside other functions operating on Text.

Test coverage

I'm not sure if this warrants a full transcript but I will add one if necessary.