From 277842c3a93ac692bb790e46d433c9941f2d11d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 5 Nov 2023 11:12:43 +0100 Subject: Fix swedish ordinals. --- module/text/numbers/sv.scm | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'module/text') 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"] -- cgit v1.2.3