authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-04 20:05:11 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-04 20:05:11 -07:00
logeae2ed2910b661553c1d25f03fc67c66c449e28f
treee8e8d6ba7d2ff1460a579d598773231e32b9b87e
parent603c995cec837b9864299a0affeefbf76f2cfab0
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

update to zig 0.16.0


2 files changed, 4 insertions(+), 6 deletions(-)

README.md+1-1
...@@ -3,7 +3,7 @@...@@ -3,7 +3,7 @@
3![loc](https://sloc.xyz/github/nektro/zig-time)3![loc](https://sloc.xyz/github/nektro/zig-time)
4[![license](https://img.shields.io/github/license/nektro/zig-time.svg)](https://github.com/nektro/zig-time/blob/master/LICENSE)4[![license](https://img.shields.io/github/license/nektro/zig-time.svg)](https://github.com/nektro/zig-time/blob/master/LICENSE)
5[![nektro @ github sponsors](https://img.shields.io/badge/sponsors-nektro-purple?logo=github)](https://github.com/sponsors/nektro)5[![nektro @ github sponsors](https://img.shields.io/badge/sponsors-nektro-purple?logo=github)](https://github.com/sponsors/nektro)
6[![Zig](https://img.shields.io/badge/Zig-0.15-f7a41d)](https://ziglang.org/)6[![Zig](https://img.shields.io/badge/Zig-0.16-f7a41d)](https://ziglang.org/)
7[![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod)7[![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod)
88
9Exposes a `DateTime` structure that can be initialized and acted upon using various methods. All public methods return a new structure.9Exposes a `DateTime` structure that can be initialized and acted upon using various methods. All public methods return a new structure.
time.zig+3-5
...@@ -250,9 +250,7 @@ pub const DateTime = struct {...@@ -250,9 +250,7 @@ pub const DateTime = struct {
250 }250 }
251251
252 /// fmt is based on https://momentjs.com/docs/#/displaying/format/252 /// fmt is based on https://momentjs.com/docs/#/displaying/format/
253 pub fn format(self: DateTime, comptime fmt: string, options: std.fmt.FormatOptions, writer: anytype) !void {253 pub fn formatFmt(self: DateTime, comptime fmt: string, writer: anytype) !void {
254 _ = options;
255
256 if (fmt.len == 0) @compileError("DateTime: format string can't be empty");254 if (fmt.len == 0) @compileError("DateTime: format string can't be empty");
257255
258 @setEvalBranchQuota(100000);256 @setEvalBranchQuota(100000);
...@@ -358,10 +356,10 @@ pub const DateTime = struct {...@@ -358,10 +356,10 @@ pub const DateTime = struct {
358 }356 }
359357
360 pub fn formatAlloc(self: DateTime, alloc: std.mem.Allocator, comptime fmt: string) !string {358 pub fn formatAlloc(self: DateTime, alloc: std.mem.Allocator, comptime fmt: string) !string {
361 var list = std.array_list.Managed(u8).init(alloc);359 var list = std.Io.Writer.Allocating.init(alloc);
362 defer list.deinit();360 defer list.deinit();
363361
364 try self.format(fmt, .{}, list.writer());362 try self.formatFmt(fmt, &list.writer);
365 return list.toOwnedSlice();363 return list.toOwnedSlice();
366 }364 }
367365