West African CFA Franc (XOF): 0 decimal places
XOF in a statement
The same integer in every state a statement can be in. Null is not zero: unknown renders as a dash, never as a zero amount.
| Value | Stored (minor units) | Statement | Money component |
|---|---|---|---|
| Positive | 1235 | 1,235 | 1,235 West African CFA Franc |
| Negative | -1235 | (1,235) | negative 1,235 West African CFA Franc |
| Zero | 0 | 0 | 0 West African CFA Franc |
| Unknown (null) | null | — | not available |
Typing XOF
What a person types, and the integer it is stored as at XOF's exponent. Rounded once, at the end.
| Typed | Stored as |
|---|---|
| 1,234.56 | 1235 |
| (1,234.56) | -1235 |
| 1.2k | 1200 |
| =1200+340*2 | 1880 |
XOF has no fraction, so 1,234.56 is rounded to the nearest whole XOF when it is read.
Split without losing a minor unit
100 XOF split three ways. Rounding each third leaves a remainder; largest-remainder allocation hands it out one minor unit at a time, so the parts always sum to the whole.
- 34
- 33
- 33
- = 100
On a check
One thousand two hundred thirty-five XOF only
The fraction is over 1 because XOF has 0 decimal places. Write any amount in words.
XOF in React
The component reads the exponent from the currency code; you pass the integer and the code, never a float and never a decimal count.
import { Money } from "@/components/ledger/money";
// 1,235 XOF, stored as the integer 1235
<Money accounting value={{ amount: 1235, currency: "XOF" }} />Also stored at 0 decimal places
Work with it
Tools that read XOF at its own exponent.