9 std::string
const st{
"st"};
10 std::string
const nd{
"nd"};
11 std::string
const rd{
"rd"};
12 std::string
const th{
"th"};
15 suffix(
unsigned const count)
18 unsigned const lastDigit = count % 10;
19 if (lastDigit >= 4 || lastDigit == 0)
22 if (count % 100 - lastDigit == 10)
24 return (lastDigit == 1 ? st : (lastDigit == 2 ? nd : rd));
32 constexpr
char tsOutput[] =
"dd-Mon-yyyy hh:mm:ss TZN ";
33 constexpr
size_t tsmax = (
sizeof tsOutput) + 1;
35 strftime(ts, tsmax,
"%d-%b-%Y %H:%M:%S %Z", localtime(&t));
37 << suffix(count) <<
" record. " <<
id <<
" at "
void issue_reports(unsigned count, EventID const &id)