Numsense
Numsense copied to clipboard
tryParseDanish "tyvetyve" returns 40
tryParseDanish "tyvetyve"
returns Some 40
, which is surprising to say the least. It was never an explicit test case, though, but is a fairly standard idiom in the language, particularly when referring to years:
- nitten-fireogfirs (1984)
- tyve-seksten (2016)
- atten-fireogtres (1864)
There are two potential ways to address such numbers:
- If they are unambiguous, a better result from
tryParseDanish "tyvetyve"
would beSome 2020
. While I suspect that they are unambiguous, anyone can, and is welcome to, prove me wrong with only a single counter-example. - If such numerals are ambiguous, the correct return value would be
None
.
Similar to #28