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:
parent
a8b5912e98
commit
d1a8724296
|
@ -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,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue