updated team stats
This commit is contained in:
@@ -260,3 +260,20 @@ func intPtrStr(v *int) string {
|
||||
}
|
||||
return fmt.Sprint(*v)
|
||||
}
|
||||
|
||||
func ordinal(n int) string {
|
||||
suffix := "th"
|
||||
if n%100 >= 11 && n%100 <= 13 {
|
||||
// 11th, 12th, 13th
|
||||
} else {
|
||||
switch n % 10 {
|
||||
case 1:
|
||||
suffix = "st"
|
||||
case 2:
|
||||
suffix = "nd"
|
||||
case 3:
|
||||
suffix = "rd"
|
||||
}
|
||||
}
|
||||
return fmt.Sprintf("%d%s", n, suffix)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user