| ... | ... | @@ -12,6 +12,7 @@ pub const DateTime = struct { |
| 12 | 12 | years: u16, |
| 13 | 13 | timezone: TimeZone, |
| 14 | 14 | weekday: WeekDay, |
| 15 | era: Era, |
| 15 | 16 | |
| 16 | 17 | const Self = @This(); |
| 17 | 18 | |
| ... | ... | @@ -48,6 +49,7 @@ pub const DateTime = struct { |
| 48 | 49 | .years = 1970, |
| 49 | 50 | .timezone = .UTC, |
| 50 | 51 | .weekday = .Thu, |
| 52 | .era = .AD, |
| 51 | 53 | }; |
| 52 | 54 | |
| 53 | 55 | pub fn eql(self: Self, other: Self) bool { |
| ... | ... | @@ -378,6 +380,11 @@ pub const WeekDay = enum { |
| 378 | 380 | } |
| 379 | 381 | }; |
| 380 | 382 | |
| 383 | pub const Era = enum { |
| 384 | // BC, |
| 385 | AD, |
| 386 | }; |
| 387 | |
| 381 | 388 | fn printOrdinal(writer: anytype, num: u16) !void { |
| 382 | 389 | try writer.print("{}", .{num}); |
| 383 | 390 | try writer.writeAll(switch (num) { |