0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-19 19:33:45 +02:00

ircd: Use fmt flags to ago(); add flag for blank postfix label.

This commit is contained in:
Jason Volk 2022-08-16 13:17:55 -07:00
parent a8b5912e98
commit d1a8724296

View file

@ -96,8 +96,9 @@ ircd::ago(const mutable_buffer &buf,
char tmp[64]; char tmp[64];
return fmt::sprintf return fmt::sprintf
{ {
buf, "%s ago", buf, "%s%s",
pretty(tmp, diff, fmt), pretty(tmp, diff, fmt & 0x01),
(fmt & 0x2)? string_view{}: " ago"_sv,
}; };
} }