Liking cljdoc? Tell your friends :D

clj-money.main


divideclj/s

(divide money & divisors)

Divides the given money structure by the divisors

Divides the given money structure by the divisors
sourceraw docstring

eqclj/s

(eq & moneys)

Returns true if all money structures are equal

Returns true if all money structures are equal
sourceraw docstring

formatclj/s

(format amount)
(format {:keys [cents currency] :as amount} options)

Returns the formatted amount and currency E.g. (format {:cents 432199, :currency "EUR"}) # => "4,321.99 EUR" :display-cents false - hide the cents ("4,321 EUR" in the example above) - true per default

Returns the formatted amount and currency
E.g. (format {:cents 432199, :currency "EUR"})
     # => "4,321.99 EUR"
:display-cents false - hide the cents ("4,321 EUR" in the example above) - true per default
sourceraw docstring

format-amountclj/s

(format-amount {:keys [cents currency]} {:keys [display-cents group-separator]})

Returns the formatted amount of the given money structure E.g. (format-amount {:cents 432199, :currency "EUR"}) # => "4,321" :display-cents true - print cents ("4,321.99" in the example above") - false per default :group-separator - use the given separator instead of the comma

Returns the formatted amount of the given money structure
E.g. (format-amount {:cents 432199, :currency "EUR"})
     # => "4,321"
:display-cents true - print cents ("4,321.99" in the example above") - false per default
:group-separator - use the given separator instead of the comma
sourceraw docstring

geclj/s

(ge & moneys)

Returns true if the given money structures are >=

Returns true if the given money structures are >=
sourceraw docstring

gtclj/s

(gt & moneys)

Returns true if the given money structures are >

Returns true if the given money structures are >
sourceraw docstring

leclj/s

(le & moneys)

Returns true if the given money structures are <=

Returns true if the given money structures are <=
sourceraw docstring

ltclj/s

(lt & moneys)

Returns true if the given money structures are <

Returns true if the given money structures are <
sourceraw docstring

maximumclj/s

(maximum)
(maximum & moneys)

Returns the biggest of the given money structure

Returns the biggest of the given money structure
sourceraw docstring

minimumclj/s

(minimum)
(minimum & moneys)

Returns the smallest of the given money structures

Returns the smallest of the given money structures
sourceraw docstring

minusclj/s

(minus & moneys)

Substracts the given money structures from the first

Substracts the given money structures from the first
sourceraw docstring

multiplyclj/s

(multiply money & multipliers)

Multipies the given money structure by the multipliers

Multipies the given money structure by the multipliers
sourceraw docstring

negative?clj/s

(negative? money)

Returns true if the given money structure is negative

Returns true if the given money structure is negative
sourceraw docstring

not-eqclj/s

(not-eq & moneys)

Returns true if the given money structures are not equal

Returns true if the given money structures are not equal
sourceraw docstring

percent-ratioclj/s

(percent-ratio a b)

Returns the ratio between the given money structures as a percent value E.g. (percent-ratio {:cents 218, :currency "EUR"} {:cents 1000, :currency "EUR"}) # => {:cents 109/5, :currency "EUR"}

Returns the ratio between the given money structures as a percent value
E.g. (percent-ratio {:cents 218, :currency "EUR"} {:cents 1000, :currency "EUR"})
     # => {:cents 109/5, :currency "EUR"}
sourceraw docstring

plusclj/s

(plus & moneys)

Sums up all given money structures

Sums up all given money structures
sourceraw docstring

positive?clj/s

(positive? money)

Returns true if the given money structure is positive

Returns true if the given money structure is positive
sourceraw docstring

round-down-to-multiple-ofclj/s

(round-down-to-multiple-of round-to money)

Rounds the second money structure to a multiple of the first E.g. (round-down-to-multiple-of {:cents 10000, :currency "EUR"} {:cents 39912, currency "EUR"}) # => {:cents 30000, :currency "EUR"}

Rounds the second money structure to a multiple of the first
E.g. (round-down-to-multiple-of {:cents 10000, :currency "EUR"} {:cents 39912, currency "EUR"})
     # => {:cents 30000, :currency "EUR"}
sourceraw docstring

with-amount->with-centsclj/s

(with-amount->with-cents {:keys [:amount :currency]} & [{:keys [:multiplier]}])
source

zeroclj/s

source

zero?clj/s

(zero? money)

Returns true if the given money structure is zero

Returns true if the given money structure is zero
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close