aboutsummaryrefslogtreecommitdiff
path: root/karlgui/src/helper.rs
diff options
context:
space:
mode:
Diffstat (limited to 'karlgui/src/helper.rs')
-rw-r--r--karlgui/src/helper.rs7
1 files changed, 7 insertions, 0 deletions
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",
+ }
+}