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

Method _parse_min_sec

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

Source from the content-addressed store, hash-verified

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