9 Commits

Author SHA1 Message Date
Sadie Powell
205603cadf Add an flag to ToHuman to shorten the output. 2025-03-03 18:19:49 +00:00
Sadie Powell
2102b065d4 Add Duration::ToHuman and update messages to use it. 2025-03-03 14:00:16 +00:00
Sadie Powell
70716c5c0d Splat some unfinished code that made it into the previous commit. 2025-03-01 16:28:47 +00:00
Sadie Powell
32a127d2e0 Avoid the use of ConvToStr in string concatenation.
This function calls INSP_FORMAT in most cases nowadays so we may
as well just call that manually.
2025-03-01 16:06:32 +00:00
InspIRCd Robot
cdd3226bef Update copyright headers. 2025-02-28 14:30:22 +00:00
Sadie Powell
90d9d02c9e Improve the consistency of duration strings.
Unfortunately because of leap years we can't really make duration
strings exact. Because of this we have always added 6 hours on to
each year to make it correct over time.

However, we did not do this in any kind of consistent way which
resulted in weird roundtripped duration strings which made this
very confusing for users

While I'm touching the duration code I've also cleaned it up.
2025-02-28 03:55:08 +00:00
InspIRCd Robot
9f0f434771 Update copyright headers. 2024-11-02 08:42:20 +00:00
Sadie Powell
d346d6783b Add the Time::FromNow helper function. 2024-10-03 10:51:21 +01:00
Sadie Powell
fe4c512839 Rename duration to timeutils and relocate InspIRCd::TimeString. 2023-05-10 11:57:48 +01:00