human-readable-duration/README.md
Yann Esposito (Yogsototh) 55ce114fd4
coveralls
2016-05-22 11:03:18 +02:00

1.3 KiB

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