packages feed

human-readable-duration 0.2.1.1 → 0.2.1.2

raw patch · 4 files changed

+54/−2 lines, 4 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Data.Duration: approximativeDuration :: Micro -> String

Files

+ README.md view
@@ -0,0 +1,37 @@+[![Build Status](https://travis-ci.org/yogsototh/human-readable-duration.svg?branch=master)](https://travis-ci.org/yogsototh/human-readable-duration)+++[![Hackage](https://img.shields.io/hackage/v/human-readable-duration.svg?maxAge=2592000)](https://hackage.haskell.org/package/human-readable-duration)+[![human-readable-duration](http://stackage.org/package/human-readable-duration/badge/lts)](http://stackage.org/lts-2/package/human-readable-duration)+[![human-readable-duration](http://stackage.org/package/human-readable-duration/badge/nightly)](http://stackage.org/lts-2/package/human-readable-duration)++[![Issue Count](https://codeclimate.com/github/yogsototh/human-readable-duration/badges/issue_count.svg)](https://codeclimate.com/github/yogsototh/human-readable-duration)+++# Human Readable Duration++This is a minimal Haskell library to display duration.+It is mostly unsafe as it uses only `Int` and `String`s (not even `Text` nor `ByteString`).++## Usage++~~~ {.haskell}+> 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`](http://github.com/commercialhaskell/stack).++~~~+stack build+~~~
human-readable-duration.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: human-readable-duration-version: 0.2.1.1+version: 0.2.1.2 license: BSD3 license-file: LICENSE maintainer: yann.esposito@gmail.com@@ -21,6 +21,9 @@     > -- will return 65923323002 category: Time build-type: Simple+extra-source-files:+    README.md+    stack.yaml  source-repository head     type: git@@ -32,6 +35,8 @@         Data.Duration.Tutorial     hs-source-dirs: src     default-language: Haskell2010+    ghc-options: -Wall -Wincomplete-uni-patterns+                 -Wredundant-constraints -Wnoncanonical-monad-instances     build-depends:         base >=4.7 && <5 
src/Data/Duration.hs view
@@ -16,6 +16,7 @@ module Data.Duration     ( humanReadableDuration     , humanReadableDuration'+    , approximativeDuration     , Seconds     -- durations     , ms@@ -33,7 +34,7 @@     , getYears     ) where -import Data.Fixed (Fixed(..), Micro, div', mod')+import           Data.Fixed (Fixed (..), Micro, div', mod')  type Seconds = Micro 
+ stack.yaml view
@@ -0,0 +1,9 @@+flags: {}+packages:+- '.'+extra-deps: []+resolver: lts-13.0+extra-lib-dirs:+  - /usr/lib+  - /usr/local/lib+  - /usr/local/opt/libiconv/lib