| ... | @@ -192,7 +192,7 @@ pub const DateTime = struct { | ... | @@ -192,7 +192,7 @@ pub const DateTime = struct { |
| 192 | switch (tag) { | 192 | switch (tag) { |
| 193 | .ddd => try writer.writeAll(@tagName(self.weekday)), | 193 | .ddd => try writer.writeAll(@tagName(self.weekday)), |
| 194 | .DD => try writer.print("{:0>2}", .{self.days + 1}), | 194 | .DD => try writer.print("{:0>2}", .{self.days + 1}), |
| 195 | .YYYY => try writer.print("{:0>4}", .{self.years}), | 195 | .YYY => try writer.print("{:0>4}", .{self.years}), |
| 196 | .HH => try writer.print("{:0>2}", .{self.hours}), | 196 | .HH => try writer.print("{:0>2}", .{self.hours}), |
| 197 | .mm => try writer.print("{:0>2}", .{self.minutes}), | 197 | .mm => try writer.print("{:0>2}", .{self.minutes}), |
| 198 | .ss => try writer.print("{:0>2}", .{self.seconds}), | 198 | .ss => try writer.print("{:0>2}", .{self.seconds}), |
| ... | @@ -206,8 +206,6 @@ pub const DateTime = struct { | ... | @@ -206,8 +206,6 @@ pub const DateTime = struct { |
| 206 | | 206 | |
| 207 | else => @compileError("'" ++ @tagName(tag) ++ "' not currently supported"), | 207 | else => @compileError("'" ++ @tagName(tag) ++ "' not currently supported"), |
| 208 | | 208 | |
| 209 | // stubs to make the parser work | | |
| 210 | .YYY => @compileError(comptime std.fmt.comptimePrint("'{s}' is not a valid format sequence", .{@tagName(tag)})), | | |
| 211 | } | 209 | } |
| 212 | next = null; | 210 | next = null; |
| 213 | s = i; | 211 | s = i; |
| ... | @@ -264,11 +262,10 @@ pub const DateTime = struct { | ... | @@ -264,11 +262,10 @@ pub const DateTime = struct { |
| 264 | W, // 1 2 ... 52 53 (ISO) | 262 | W, // 1 2 ... 52 53 (ISO) |
| 265 | Wo, // 1st 2nd ... 52nd 53rd | 263 | Wo, // 1st 2nd ... 52nd 53rd |
| 266 | WW, // 01 02 ... 52 53 | 264 | WW, // 01 02 ... 52 53 |
| 267 | YY, // 70 71 ... 29 30 | | |
| 268 | YYY, // stub | | |
| 269 | YYYY, // 1970 1971 ... 2029 2030 | | |
| 270 | YYYYYY, // -001970 -001971 ... +001907 +001971 | | |
| 271 | Y, // 1970 1971 ... 9999 +10000 +10001 | 265 | Y, // 1970 1971 ... 9999 +10000 +10001 |
| | 266 | YY, // 70 71 ... 29 30 |
| | 267 | YYY, // 1970 1971 ... 2029 2030 |
| | 268 | YYYY, // -001970 -001971 ... +001907 +001971 |
| 272 | y, // 1 2 ... 2020 ... (era) | 269 | y, // 1 2 ... 2020 ... (era) |
| 273 | N, // BC AD | 270 | N, // BC AD |
| 274 | NN, // Before Christ ... Anno Domini | 271 | NN, // Before Christ ... Anno Domini |