s_per_min in format.zig
All checks were successful
Generic zig build / build (push) Successful in 48s
All checks were successful
Generic zig build / build (push) Successful in 48s
This commit is contained in:
parent
51c7dc9fdd
commit
7a907fcc8d
1 changed files with 1 additions and 1 deletions
|
|
@ -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 "?";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue