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 @@
33![loc](https://sloc.xyz/github/nektro/zig-time)
44[![license](https://img.shields.io/github/license/nektro/zig-time.svg)](https://github.com/nektro/zig-time/blob/master/LICENSE)
55[![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/)
77[![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod)
88
99Exposes 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 {
250250 }
251251
252252 /// 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 {
254 _ = options;
255
253 pub fn formatFmt(self: DateTime, comptime fmt: string, writer: anytype) !void {
256254 if (fmt.len == 0) @compileError("DateTime: format string can't be empty");
257255
258256 @setEvalBranchQuota(100000);
......@@ -358,10 +356,10 @@ pub const DateTime = struct {
358356 }
359357
360358 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);
362360 defer list.deinit();
363361
364 try self.format(fmt, .{}, list.writer());
362 try self.formatFmt(fmt, &list.writer);
365363 return list.toOwnedSlice();
366364 }
367365