             let centsIndex = formattedString.index(range!.lowerBound, offsetBy: 1)
             cents = formattedString.substring(from: centsIndex)
         }
-
+        
         if cents.isEmpty || cents.characters.count < 2 {
             var missingZeros = 2 - cents.characters.count
             while missingZeros > 0 {

        dateFormatter.dateFormat = "yyyy-MM-dd"
        return dateFormatter.string(from: date)
    }

    class func getAttributedAmount(_ amount : Double, currency : Currency, color : UIColor = UIColor.white(), fontSize : CGFloat = 20, baselineOffset : Int = 7) -> NSAttributedString {
        return self.getAttributedAmount(amount, thousandSeparator: currency.thousandsSeparator, decimalSeparator: currency.decimalSeparator, currencySymbol: currency.symbol, color : color, fontSize : fontSize, baselineOffset : baselineOffset)
    }

     returns 10,200.90
     **/
    class func getAmountFormatted(_ formattedString : String, thousandSeparator: String, decimalSeparator: String) -> String {
        
        let amount = self.getAmountDigits(formattedString, decimalSeparator : decimalSeparator)
        let length = amount.characters.count
        if length <= 3 {
            return amount
        }
        var numberWithoutLastThreeDigits: String = ""
        if let amountString = Double(formattedString){
            numberWithoutLastThreeDigits = String( Int(amountString/1000))
        }
        let lastThreeDigits = formattedString.lastCharacters(number: 3)
        
        return  getAmountFormatted(numberWithoutLastThreeDigits, thousandSeparator: thousandSeparator, decimalSeparator:thousandSeparator).appending(thousandSeparator).appending(lastThreeDigits)
        
    }
    
    /**
     Extract only amount digits
     Ex: formattedString = "1000.00" with decimalSeparator = "."
     returns 1000
     **/
    class func getAmountDigits(_ formattedString : String, decimalSeparator : String) -> String {
        let range = formattedString.range(of: decimalSeparator)
        if range != nil {
