Skip to content

Commit

Permalink
Add information regarding exponent to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-clearhaus committed Jan 2, 2013
1 parent 16d0ca5 commit b9f04d4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Expand Up @@ -186,6 +186,19 @@ Money.default_currency = Money::Currency.new("CAD")

If you use Rails, then `environment.rb` is a very good place to put this.

### Currency Exponent

The exponent of a money value is the number of digits after the decimal
separator (which separates the major unit from the minor unit). See e.g.
[Wikipedia on ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) for more
information. You can find the exponent (as a `Float`) by

``` ruby
Money::Currency.new("USD").exponent # => 2.0
Money::Currency.new("JPY").exponent # => 0.0
Money::Currency.new("MGA").exponent # => 0.6989700043360189
```

## Currency Exchange

Exchanging money is performed through an exchange bank object. The default
Expand Down

0 comments on commit b9f04d4

Please sign in to comment.