| ... | ... | @@ -1,6 +1,7 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const string = []const u8; |
| 3 | 3 | const range = @import("range").range; |
| 4 | const extras = @import("extras"); |
| 4 | 5 | const time = @This(); |
| 5 | 6 | |
| 6 | 7 | pub const DateTime = struct { |
| ... | ... | @@ -405,10 +406,7 @@ pub const format = struct { |
| 405 | 406 | pub const TimeZone = enum { |
| 406 | 407 | UTC, |
| 407 | 408 | |
| 408 | | pub fn jsonStringify(self: @This(), options: std.json.StringifyOptions, out_stream: anytype) !void { |
| 409 | | _ = options; |
| 410 | | try out_stream.writeAll(@tagName(self)); |
| 411 | | } |
| 409 | usingnamespace extras.TagNameJsonStringifyMixin(@This()); |
| 412 | 410 | }; |
| 413 | 411 | |
| 414 | 412 | pub const WeekDay = enum { |
| ... | ... | @@ -432,20 +430,14 @@ pub const WeekDay = enum { |
| 432 | 430 | }; |
| 433 | 431 | } |
| 434 | 432 | |
| 435 | | pub fn jsonStringify(self: @This(), options: std.json.StringifyOptions, out_stream: anytype) !void { |
| 436 | | _ = options; |
| 437 | | try out_stream.writeAll(@tagName(self)); |
| 438 | | } |
| 433 | usingnamespace extras.TagNameJsonStringifyMixin(@This()); |
| 439 | 434 | }; |
| 440 | 435 | |
| 441 | 436 | pub const Era = enum { |
| 442 | 437 | // BC, |
| 443 | 438 | AD, |
| 444 | 439 | |
| 445 | | pub fn jsonStringify(self: @This(), options: std.json.StringifyOptions, out_stream: anytype) !void { |
| 446 | | _ = options; |
| 447 | | try out_stream.writeAll(@tagName(self)); |
| 448 | | } |
| 440 | usingnamespace extras.TagNameJsonStringifyMixin(@This()); |
| 449 | 441 | }; |
| 450 | 442 | |
| 451 | 443 | pub fn isLeapYear(year: u16) bool { |