gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 14/19: CurrencyFormatter


From: gnunet
Subject: [taler-taler-ios] 14/19: CurrencyFormatter
Date: Sat, 02 Sep 2023 22:01:15 +0200

This is an automated email from the git hooks/post-receive script.

marc-stibane pushed a commit to branch master
in repository taler-ios.

commit 625b0a5a6c7463e029c8a539997b6372925bc451
Author: Marc Stibane <marc@taler.net>
AuthorDate: Thu Aug 31 21:13:18 2023 +0200

    CurrencyFormatter
---
 TalerWallet1/Helper/CurrencyFormatter.swift | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/TalerWallet1/Helper/CurrencyFormatter.swift 
b/TalerWallet1/Helper/CurrencyFormatter.swift
index 42f391b..b997731 100644
--- a/TalerWallet1/Helper/CurrencyFormatter.swift
+++ b/TalerWallet1/Helper/CurrencyFormatter.swift
@@ -6,19 +6,22 @@ import Foundation
 import taler_swift
 
 public class CurrencyFormatter: NumberFormatter {
-    public static var shared = CurrencyFormatter()
+    public static let shared = CurrencyFormatter()
 
-    private override convenience init() {
-        self.init(fractionDigits: 2)
-    }
-
-    public init(fractionDigits: Int) {
+    public override init() {
         super.init()
-        self.numberStyle = .decimal // currency could be changed by user
-        self.minimumFractionDigits = fractionDigits
-        self.maximumFractionDigits = fractionDigits
-        self.usesGroupingSeparator = true
         self.locale = Locale.current
+        self.numberStyle = .currency            // currencyISOCode, 
currencyPlural, (currencyAccounting)
+        self.numberStyle = .currencyISOCode
+        self.numberStyle = .spellOut
+
+//        self.currencyCode = code              // EUR, USD, JPY, GBP
+//        self.minimumFractionDigits = fractionDigits
+//        self.maximumFractionDigits = fractionDigits
+//        self.groupingSize = 3                 // thousands
+//        self.groupingSeparator = ","
+//        self.usesGroupingSeparator = true
+//        self.decimalSeparator = "."
     }
 
     required init?(coder aDecoder: NSCoder) {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]