From deb19783b30dc37c8d50d1488e4c31df5b156c7a Mon Sep 17 00:00:00 2001 From: naskya Date: Fri, 1 Dec 2023 05:27:32 +0900 Subject: [PATCH] chore: use compact time units (e.g., seconds -> s) --- src/Data/EventTime/Local.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Data/EventTime/Local.hs b/src/Data/EventTime/Local.hs index 941fbda..37eadaf 100644 --- a/src/Data/EventTime/Local.hs +++ b/src/Data/EventTime/Local.hs @@ -269,20 +269,20 @@ class SpecToEventTime s where showSingle :: TimeUnit -> Text showSingle tu = case tu of - Second -> "second" - Minute -> "minute" - Hour -> "hour" - Day -> "day" - Week -> "week" - Month -> "month" - Year -> "year" + Second -> "s" + Minute -> "m" + Hour -> "h" + Day -> "d" + Week -> "w" + Month -> "mo" + Year -> "y" showPlural :: TimeUnit -> Text showPlural tu = showSingle tu `snoc` 's' showTimeUnit :: TimeUnit -> Int -> Text showTimeUnit tu 1 = showSingle tu -showTimeUnit tu _ = showPlural tu +showTimeUnit tu _ = showSingle tu showTimeAgo :: TimeAgo -> Text