No description
Find a file
Yann Esposito (Yogsototh) 0869191c5b
updated hompage
2018-12-28 20:37:17 +01:00
bench added type synonym Seconds and one benchmark 2016-07-15 15:21:20 +02:00
src/Data Merge branch 'master' of gitlab.esy.fun:yogsototh/human-readable-duration 2018-12-28 20:33:25 +01:00
test wip 2016-05-23 01:09:33 +02:00
.codeclimate.yml coveralls 2016-05-22 11:03:18 +02:00
.gitignore initial commit 2015-08-13 16:47:36 +02:00
.travis.yml wip 2016-05-23 01:09:33 +02:00
human-readable-duration.cabal updated hompage 2018-12-28 20:37:17 +01:00
LICENSE initial commit 2015-08-13 16:47:36 +02:00
README.md coveralls 2016-05-22 11:03:18 +02:00
Setup.hs initial commit 2015-08-13 16:47:36 +02:00
stack.yaml Shorter approximative duration (generally better for most usage) 2018-12-28 20:24:42 +01:00

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