Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
Yann Esposito (Yogsototh) a5424df634
bumped version
2 lat temu
bench added type synonym Seconds and one benchmark 5 lat temu
src/Data forgot to expose new function, cabal enhancement 3 lat temu
test wip 6 lat temu
.codeclimate.yml coveralls 6 lat temu
.gitignore fix test 2 lat temu
.travis.yml wip 6 lat temu
LICENSE initial commit 6 lat temu
README.md coveralls 6 lat temu
Setup.hs initial commit 6 lat temu
human-readable-duration.cabal bumped version 2 lat temu
stack.yaml Shorter approximative duration (generally better for most usage) 3 lat temu

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