| author | |
| committer | |
| log | 56d2be5b73a82a3973d1060fc72734da665e485e |
| tree | c9ce07251a649096529f7e131da183733a4a5726 |
| parent | 78fa299e3169be7d30fdffec528b27fabab90928 |
| signature | Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw |
1 files changed, 4 insertions(+), 0 deletions(-)
ulid.zig+4| ... | ... | @@ -75,4 +75,8 @@ pub const ULID = struct { |
| 75 | 75 | pub fn stringifyJson(self: ULID, writer: anytype, options: std.json.Stringify.Options, json: type) !void { |
| 76 | 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 | }; |