diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-11-05 11:12:43 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-11-16 00:51:19 +0100 |
commit | 277842c3a93ac692bb790e46d433c9941f2d11d4 (patch) | |
tree | f31041542714e6cbceb747022de51c1b1ae1b65d /module | |
parent | Fix rec advance test. (diff) | |
download | calp-277842c3a93ac692bb790e46d433c9941f2d11d4.tar.gz calp-277842c3a93ac692bb790e46d433c9941f2d11d4.tar.xz |
Fix swedish ordinals.
Diffstat (limited to '')
-rw-r--r-- | module/text/numbers/sv.scm | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/module/text/numbers/sv.scm b/module/text/numbers/sv.scm index 858668a5..5764abbc 100644 --- a/module/text/numbers/sv.scm +++ b/module/text/numbers/sv.scm @@ -146,16 +146,11 @@ [(<= 30 n 99) (let ((big small (floor/ n 10))) (string-append - (case big - [(3) "tret"] - [(4) "fyr"] - [(8) "åt"] - [(7) "sjut"] - [(9) "nit"] - [else (number->string-cardinal big)]) - "tio" - (number->string-ordinal - small a-form?: a-form?)))] + (number->string-cardinal (* 10 big)) + (if (zero? small) + "nde" + (number->string-ordinal + small a-form?: a-form?))))] [(= n 100) "etthundrade"] |