s_per_min in format.zig

This commit is contained in:
Emil Lerch 2026-03-17 10:28:57 -07:00
parent 62ee9b3e32
commit e90bcde2cf

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 "?";