authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-04-25 17:09:18 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-04-25 17:09:18 -07:00
logd3a17e27f0ffcb4447db9ae71ed30ad0318820a4
treedc2505f8bec55260e0dec3f9b812f27356e9f1a9
parentbfb7da7b8ee92b6c07f90a14b044a9b8f4df182c

having DateTime.toUnix() doesnt cause a compiler crash anymore


1 files changed, 6 insertions(+), 6 deletions(-)

time.zig+6-6
...@@ -194,10 +194,10 @@ pub const DateTime = struct {...@@ -194,10 +194,10 @@ pub const DateTime = struct {
194 return ret;194 return ret;
195 }195 }
196196
197 // pub fn toUnix(self: Self) u64 {197 pub fn toUnix(self: Self) u64 {
198 // const x = self.toUnix();198 const x = self.toUnix();
199 // return x / 1000;199 return x / 1000;
200 // }200 }
201201
202 pub fn toUnixMilli(self: Self) u64 {202 pub fn toUnixMilli(self: Self) u64 {
203 var res: u64 = 0;203 var res: u64 = 0;
...@@ -300,7 +300,7 @@ pub const DateTime = struct {...@@ -300,7 +300,7 @@ pub const DateTime = struct {
300 .ZZ => try writer.writeAll("+0000"),300 .ZZ => try writer.writeAll("+0000"),
301301
302 .x => try writer.print("{}", .{self.toUnixMilli()}),302 .x => try writer.print("{}", .{self.toUnixMilli()}),
303 // .X => try writer.print("{}", .{self.toUnix()}),303 .X => try writer.print("{}", .{self.toUnix()}),
304 }304 }
305 next = null;305 next = null;
306 s = i;306 s = i;
...@@ -381,7 +381,7 @@ pub const DateTime = struct {...@@ -381,7 +381,7 @@ pub const DateTime = struct {
381 Z, // -07:00 -06:00 ... +06:00 +07:00381 Z, // -07:00 -06:00 ... +06:00 +07:00
382 ZZ, // -0700 -0600 ... +0600 +0700382 ZZ, // -0700 -0600 ... +0600 +0700
383 x, // unix milli383 x, // unix milli
384 // X, // unix384 X, // unix
385 };385 };
386};386};
387387