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 години
README.md 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 години

README.md

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).

Usage

> 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
2
> getDays duration
763
> getMs duration
65923323002

Install

Install stack.

stack build