summaryrefslogtreecommitdiffstats
path: root/RenderTreeView.hs
diff options
context:
space:
mode:
Diffstat (limited to 'RenderTreeView.hs')
-rw-r--r--RenderTreeView.hs18
1 files changed, 10 insertions, 8 deletions
diff --git a/RenderTreeView.hs b/RenderTreeView.hs
index 3926282..a50bf37 100644
--- a/RenderTreeView.hs
+++ b/RenderTreeView.hs
@@ -25,20 +25,22 @@ import TreeView
humanTimeLocale :: HumanTimeLocale
humanTimeLocale = defaultHumanTimeLocale
{ justNow = "now"
- , secondsAgo = (++ "s ago")
- , oneMinuteAgo = "1m ago"
- , minutesAgo = (++ "m ago")
- , oneHourAgo = "1h ago"
- , aboutHoursAgo = (++ "h ago")
+ , secondsAgo = \f -> (++ "s" ++ dir f)
+ , oneMinuteAgo = \f -> "1m" ++ dir f
+ , minutesAgo = \f -> (++ "m" ++ dir f)
+ , oneHourAgo = \f -> "1h" ++ dir f
+ , aboutHoursAgo = \f -> (++ "h" ++ dir f)
, at = \_ -> ("" ++)
- , daysAgo = (++ "d ago")
- , weekAgo = (++ "w ago")
- , weeksAgo = (++ "w ago")
+ , daysAgo = \f -> (++ "d" ++ dir f)
+ , weekAgo = \f -> (++ "w" ++ dir f)
+ , weeksAgo = \f -> (++ "w" ++ dir f)
, onYear = ("" ++)
, dayOfWeekFmt = "%a %H:%M"
, thisYearFmt = "%b %e"
, prevYearFmt = "%b %e, %Y"
}
+ where dir True = " from now"
+ dir False = " ago"
renderTreeView