You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Yann Esposito (Yogsototh) a5424df634
bumped version
2 年之前
bench added type synonym Seconds and one benchmark 5 年之前
src/Data forgot to expose new function, cabal enhancement 3 年之前
test wip 6 年之前
.codeclimate.yml coveralls 6 年之前
.gitignore fix test 2 年之前
.travis.yml wip 6 年之前
LICENSE initial commit 6 年之前 coveralls 6 年之前
Setup.hs initial commit 6 年之前
human-readable-duration.cabal bumped version 2 年之前
stack.yaml Shorter approximative duration (generally better for most usage) 3 年之前

Build Status

Hackage human-readable-duration human-readable-duration

Issue Count

Human Readable Duration

This is a minimal Haskell library to display duration. It is mostly unsafe as it uses only Int and Strings (not even Text nor ByteString).


> import Data.Duration
> let duration = 2*ms + 3*oneSecond + 2*minute + 33*day + 2*year
> humanReadableDuration duration
"2 years 33 days 2 min 3s 2ms"
> getYears duration
> getDays duration
> getMs duration


Install stack.

stack build