| ... | @@ -404,6 +404,11 @@ pub const format = struct { | ... | @@ -404,6 +404,11 @@ pub const format = struct { |
| 404 | | 404 | |
| 405 | pub const TimeZone = enum { | 405 | pub const TimeZone = enum { |
| 406 | UTC, | 406 | UTC, |
| | 407 | |
| | 408 | pub fn jsonStringify(self: @This(), options: std.json.StringifyOptions, out_stream: anytype) !void { |
| | 409 | _ = options; |
| | 410 | try out_stream.writeAll(@tagName(self)); |
| | 411 | } |
| 407 | }; | 412 | }; |
| 408 | | 413 | |
| 409 | pub const WeekDay = enum { | 414 | pub const WeekDay = enum { |
| ... | @@ -426,11 +431,21 @@ pub const WeekDay = enum { | ... | @@ -426,11 +431,21 @@ pub const WeekDay = enum { |
| 426 | .Sat => .Sun, | 431 | .Sat => .Sun, |
| 427 | }; | 432 | }; |
| 428 | } | 433 | } |
| | 434 | |
| | 435 | pub fn jsonStringify(self: @This(), options: std.json.StringifyOptions, out_stream: anytype) !void { |
| | 436 | _ = options; |
| | 437 | try out_stream.writeAll(@tagName(self)); |
| | 438 | } |
| 429 | }; | 439 | }; |
| 430 | | 440 | |
| 431 | pub const Era = enum { | 441 | pub const Era = enum { |
| 432 | // BC, | 442 | // BC, |
| 433 | AD, | 443 | AD, |
| | 444 | |
| | 445 | pub fn jsonStringify(self: @This(), options: std.json.StringifyOptions, out_stream: anytype) !void { |
| | 446 | _ = options; |
| | 447 | try out_stream.writeAll(@tagName(self)); |
| | 448 | } |
| 434 | }; | 449 | }; |
| 435 | | 450 | |
| 436 | pub fn isLeapYear(year: u16) bool { | 451 | pub fn isLeapYear(year: u16) bool { |