Show number of second for very recent posts
This commit is contained in:
parent
f5879ab02a
commit
47c0a20664
1 changed files with 2 additions and 1 deletions
|
@ -62,7 +62,8 @@ humanReadableOld currentTime entry =
|
|||
years t = t / year
|
||||
showTime t = show (floor t :: Integer)
|
||||
showDuration t
|
||||
| t < minute = "1m"
|
||||
| t < second = "1s"
|
||||
| t < minute = pack $ (showTime $ seconds t) ++ " seconds ago"
|
||||
| t < hour = pack $ (showTime $ minutes t) ++ " minutes ago"
|
||||
| t < day = pack $ (showTime $ hours t) ++ " hours ago"
|
||||
| t < year = pack $ (showTime $ days t) ++ " days ago"
|
||||
|
|
Loading…
Reference in a new issue