(self, idx, tokens, info, hms_idx)
| 1109 | return (minute, second) |
| 1110 | |
| 1111 | def _parse_hms(self, idx, tokens, info, hms_idx): |
| 1112 | # TODO: Is this going to admit a lot of false-positives for when we |
| 1113 | # just happen to have digits and "h", "m" or "s" characters in non-date |
| 1114 | # text? I guess hex hashes won't have that problem, but there's plenty |
| 1115 | # of random junk out there. |
| 1116 | if hms_idx is None: |
| 1117 | hms = None |
| 1118 | new_idx = idx |
| 1119 | elif hms_idx > idx: |
| 1120 | hms = info.hms(tokens[hms_idx]) |
| 1121 | new_idx = hms_idx |
| 1122 | else: |
| 1123 | # Looking backwards, increment one. |
| 1124 | hms = info.hms(tokens[hms_idx]) + 1 |
| 1125 | new_idx = idx |
| 1126 | |
| 1127 | return (new_idx, hms) |
| 1128 | |
| 1129 | # ------------------------------------------------------------------ |
| 1130 | # Handling for individual tokens. These are kept as methods instead |
no test coverage detected