authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-07-28 04:54:41-07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-07-28 04:54:41-07:00
log56d2be5b73a82a3973d1060fc72734da665e485e
treec9ce07251a649096529f7e131da183733a4a5726
parent78fa299e3169be7d30fdffec528b27fabab90928
signature Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

add createdAt


1 files changed, 4 insertions(+), 0 deletions(-)

ulid.zig+4
...@@ -75,4 +75,8 @@ pub const ULID = struct {...@@ -75,4 +75,8 @@ pub const ULID = struct {
75 pub fn stringifyJson(self: ULID, writer: anytype, options: std.json.Stringify.Options, json: type) !void {75 pub fn stringifyJson(self: ULID, writer: anytype, options: std.json.Stringify.Options, json: type) !void {
76 return json.stringify(writer, &self.bytes(), options);76 return json.stringify(writer, &self.bytes(), options);
77 }77 }
78
79 pub fn createdAt(self: ULID, epoch: u64) time.DateTime {
80 return .initUnixMs(epoch + self.timestamp);
81 }
78};82};