diff --git a/time.zig b/time.zig index 130fe6ac3e51c65f4d8228c526eed1f7990c28f3..debbcd03d1d74b42c046608e036ff4d734cb831e 100644 --- a/time.zig +++ b/time.zig @@ -12,6 +12,7 @@ pub const DateTime = struct { years: u16, timezone: TimeZone, weekday: WeekDay, + era: Era, const Self = @This(); @@ -48,6 +49,7 @@ pub const DateTime = struct { .years = 1970, .timezone = .UTC, .weekday = .Thu, + .era = .AD, }; pub fn eql(self: Self, other: Self) bool { @@ -378,6 +380,11 @@ pub const WeekDay = enum { } }; +pub const Era = enum { + // BC, + AD, +}; + fn printOrdinal(writer: anytype, num: u16) !void { try writer.print("{}", .{num}); try writer.writeAll(switch (num) {