diff options
author | joeybloggs <Dean.Karn@gmail.com> | 2016-08-16 04:59:49 +0300 |
---|---|---|
committer | joeybloggs <Dean.Karn@gmail.com> | 2016-08-16 04:59:49 +0300 |
commit | aaa28727a7fc0cc7add5d60b31abfe62b983bedd (patch) | |
tree | 032798ba24e7ab36f7532d5ae66df80805029538 /rules.go | |
parent | 5e30685010ab9c6da8cc729a3e7eab0b1ae964ae (diff) |
add accounting currency formatting logic + function
Diffstat (limited to 'rules.go')
-rw-r--r-- | rules.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -76,6 +76,11 @@ type Translator interface { // returned as a []byte just in case the caller wishes to add more and can help // avoid allocations; otherwise just cast as string. FmtCurrency(num float64, v uint64, currency currency.Type) []byte + + // returns the currency representation of 'num' with digits/precision of 'v' for locale + // in accounting notation. returned as a []byte just in case the caller wishes to add more and can help + // avoid allocations; otherwise just cast as string. + FmtAccounting(num float64, v uint64, currency currency.Type) []byte } // String returns the string value of PluralRule |