On this page
Money and branded values
Money is signed AUD in safe integer cents. Constructors name their units. Numeric dollars are not accepted: decimal text converts exactly, and more than two fractional digits fail.
fromCents(number), fromDecimal(string), add and subtract return native Result. nonNegative(money) establishes the refinement required by gross pay, salary sacrifice and annual taxable-income scenarios. The Effect entrypoint lifts these same operations lazily.
format emits two decimal digits and round-trips signed Money. MoneyFromDecimalString and NonNegativeMoneyFromDecimalString are native codecs. Arithmetic checks overflow and subtraction returns signed Money. round requires a named policy; statutory formulas retain Effect BigDecimal and their legal rounding step.