//
//  FixedWidthInteger+Extensions.swift
//  PadelClub
//
//  Created by Razmig Sarkissian on 03/03/2024.
//

import Foundation

public extension FixedWidthInteger {
    func ordinalFormattedSuffix() -> String {
        switch self {
        case 1: return "er"
        default: return "ème"
        }
    }
    
    func ordinalFormatted() -> String {
        return self.formatted() + self.ordinalFormattedSuffix()
    }
    
    var pluralSuffix: String {
        return self > 1 ? "s" : ""
    }
}
