From dcca09510f26fa26ccba55828199a83583714560 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Tue, 14 Jul 2026 17:45:37 -0700 Subject: [PATCH] DateTime: add stringifyJson --- time.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/time.zig b/time.zig index c2fe9bc6fe5fe78a6d0a4c20a7f9aaedf27c99a5..b4bfdb3a31cb24c2ad5002f91f7ac4125e505e8f 100644 --- a/time.zig +++ b/time.zig @@ -446,6 +446,10 @@ pub const DateTime = struct { } return result; } + + pub fn stringifyJson(self: DateTime, writer: anytype, options: std.json.Stringify.Options, json: type) !void { + return json.stringify(writer, &self.toISOString(), options); + } }; pub const format = struct { -- 2.54.0