The currencies package

[ Tags: bsd3, data, library ] [ Propose Tags ]

ISO 4217 Currencies representation, pretty printing and conversion:


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.1, 0.1.1.0
Dependencies base (>=4.7 && <5), text (>=1.2 && <2) [details]
License BSD3
Copyright 2017 Daniel Campoverde [alx741]
Author Daniel Campoverde [alx741]
Maintainer alx@sillybytes.net
Category Data
Home page https://github.com/alx741/currencies#readme
Source repository head: git clone https://github.com/alx741/currencies
Uploaded Sun Aug 20 18:45:22 UTC 2017 by alx741
Distributions NixOS:0.1.1.0, Stackage:0.1.1.0
Downloads 104 total (21 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-08-20 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for currencies-0.1.1.0

[back to package description]

CircleCI

currencies

ISO 4217 Currencies representation, pretty printing and conversion:

  • Represent monetary amounts of a particular currency in a type-safe manner
  • Convert amounts between different currencies
  • Print human readable amounts
prettyPrint (Amount USD 2342.2)
-- "USD 2,342.20"

prettyPrint (Amount EUR 45827.346)
-- "UER 45,827.35"

prettyPrintWith (defaultConfig { useCurrencySymbol = True }) (Amount USD 2342.2)
-- "$ a,342.20"

prettyPrintWith (defaultConfig { useCurrencySymbol = True }) (Amount EUR 2342.2)
-- "€ 2,342.20"

prettyPrintWith (defaultConfig { showDecimals = False }) (Amount USD 25.50)
-- "USD 25"

convert USD (Amount EUR 23482.34)
-- Amount USD 27709.1612

prettyPrint $ convert USD (Amount EUR 23482.34)
-- "USD 27,709.16"

compareAmounts  (Amount EUR 1000) (Amount BTC 1)
-- LT