commit e6d94fb48150fa22f248735765ab7f3e00aab1dc
parent 6b286c836903c2075a7b327f22543e7dcad2282f
Author: Sebastian <sebasjm@gmail.com>
Date: Wed, 4 Oct 2023 10:35:21 -0300
show code block
Diffstat:
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/design-documents/051-fractional-digits.rst b/design-documents/051-fractional-digits.rst
@@ -1,5 +1,5 @@
DD 51: Fractional Digits
-###############
+#########################
Summary
=======
@@ -36,13 +36,15 @@ after the decimal separator, and fractions of a cent/penny are rendered as Super
Proposed Solution
=================
-public struct ScopedCurrencyInfo: Codable, Sendable {
- let decimalSeparator: String // e.g. “.” for $ and ¥; “,” for €
- let numFractionalInputDigits: Int // how much digits the user may enter after the decimalSeparator
- let numFractionalNormalDigits: Int // €,$,£: 2; some arabic currencies: 3, ¥: 0
- let numFractionalTrailingZeroDigits: Int // usually same as numFractionalNormalDigits, but e.g. might be 2 for ¥
- let isCurrencyNameLeading: Bool // true for “$ 3.50”; false for “3,50 €”
-}
+ .. code-block:: swift
+
+ public struct ScopedCurrencyInfo: Codable, Sendable {
+ let decimalSeparator: String // e.g. “.” for $ and ¥; “,” for €
+ let numFractionalInputDigits: Int // how much digits the user may enter after the decimalSeparator
+ let numFractionalNormalDigits: Int // €,$,£: 2; some arabic currencies: 3, ¥: 0
+ let numFractionalTrailingZeroDigits: Int // usually same as numFractionalNormalDigits, but e.g. might be 2 for ¥
+ let isCurrencyNameLeading: Bool // true for “$ 3.50”; false for “3,50 €”
+ }
Definition of Done