MCPcopy Create free account
hub / github.com/dateutil/dateutil / _parse_min_sec

Method _parse_min_sec

src/dateutil/parser/_parser.py:1099–1109  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

1097 return hour
1098
1099 def _parse_min_sec(self, value):
1100 # TODO: Every usage of this function sets res.second to the return
1101 # value. Are there any cases where second will be returned as None and
1102 # we *don't* want to set res.second = None?
1103 minute = int(value)
1104 second = None
1105
1106 sec_remainder = value % 1
1107 if sec_remainder:
1108 second = int(60 * sec_remainder)
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

Callers 2

_parse_numeric_tokenMethod · 0.95
_assign_hmsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected