s_per_min in format.zig
All checks were successful
Generic zig build / build (push) Successful in 48s

This commit is contained in:
Emil Lerch 2026-03-17 10:28:57 -07:00
parent 51c7dc9fdd
commit 7a907fcc8d
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -245,7 +245,7 @@ pub fn fmtTimeAgo(buf: []u8, timestamp: i64) []const u8 {
if (delta < 0) return "just now";
if (delta < 60) return "just now";
if (delta < std.time.s_per_hour) {
return std.fmt.bufPrint(buf, "{d}m ago", .{@as(u64, @intCast(@divFloor(delta, 60)))}) catch "?";
return std.fmt.bufPrint(buf, "{d}m ago", .{@as(u64, @intCast(@divFloor(delta, std.time.s_per_min)))}) catch "?";
}
if (delta < std.time.s_per_day) {
return std.fmt.bufPrint(buf, "{d}h ago", .{@as(u64, @intCast(@divFloor(delta, std.time.s_per_hour)))}) catch "?";