From fd5294bf2775330a48e8f049395b17498b9264b3 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 18 Aug 2022 18:01:25 +0200 Subject: height controls --- karlgui/src/helper.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'karlgui/src/helper.rs') diff --git a/karlgui/src/helper.rs b/karlgui/src/helper.rs index 4f8f4f4..0192173 100644 --- a/karlgui/src/helper.rs +++ b/karlgui/src/helper.rs @@ -97,3 +97,10 @@ pub fn month_to_str(value: i64) -> &'static str { _ => "(invalid)", } } +pub fn ordering_suffix(value: u32) -> &'static str { + match value { + 1 => "st", + 2 => "nd", + _ => "th", + } +} -- cgit v1.2.3-70-g09d2