var title3: String {
switch ProductID(rawValue: product.id) {
case .yearly:
let yearlyPricePerWeek: Decimal = product.price / 52
return "\(product.priceFormatStyle.format(yearlyPricePerWeek)) per week" // PLN
case .weekly:
return "\(product.displayPrice) per week" // zl
case .weeklyWithTrial:
return "then \(product.displayPrice) per week" // zl
case .none:
return ""
}
}
Подробнее здесь: https://stackoverflow.com/questions/789 ... y-code-pln
Мобильная версия