Select the ending of the ordinal day number
| 81 | |
| 82 | // Select the ending of the ordinal day number |
| 83 | std::string ending(int date_day) |
| 84 | { |
| 85 | if (date_day == 1 || date_day == 21 || date_day == 31) |
| 86 | return "st"; |
| 87 | else if (date_day == 2 || date_day == 22) |
| 88 | return "nd"; |
| 89 | else if (date_day == 3 || date_day == 23) |
| 90 | return "rd"; |
| 91 | else |
| 92 | return "th"; |
| 93 | } |