No description
Find a file
Yann Esposito 94b6b39ed3 Merge pull request #2 from mstksg/master
Underlying representation can be `Micro`, fixed-precision number?
2016-01-12 15:24:51 +01:00
src/Data Realized that giving explicit DiffTime functions is redundant because you could just write one parameterized over all Real 2016-01-12 01:43:03 -08:00
test initial commit 2015-08-13 16:47:36 +02:00
.gitignore initial commit 2015-08-13 16:47:36 +02:00
human-readable-duration.cabal Realized that giving explicit DiffTime functions is redundant because you could just write one parameterized over all Real 2016-01-12 01:43:03 -08:00
LICENSE initial commit 2015-08-13 16:47:36 +02:00
README.md updated doc and LTS 2015-11-25 20:55:57 +01:00
Setup.hs initial commit 2015-08-13 16:47:36 +02:00
stack.yaml updated doc and LTS 2015-11-25 20:55:57 +01:00

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

Install

Install stack.

stack build

Usage

> 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