| 44 | namespace { |
| 45 | |
| 46 | bool MatchFixedOffset(const std::string& tz, std::string_view* sign, |
| 47 | std::string_view* hour, std::string_view* minute) { |
| 48 | static const std::regex regex("^([+-])(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9])$"); |
| 49 | if (tz.size() < 5) { |
| 50 | return false; |
| 51 | } |
| 52 | return RegexMatch(regex, tz, {sign, hour, minute}); |
| 53 | } |
| 54 | |
| 55 | constexpr char* NonConst(const char* st) { |
| 56 | // Hack for python versions < 3.7 where members of PyStruct members |
no test coverage detected