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

Method validate

src/dateutil/parser/_parser.py:380–391  ·  view source on GitHub ↗
(self, res)

Source from the content-addressed store, hash-verified

378 return year
379
380 def validate(self, res):
381 # move to info
382 if res.year is not None:
383 res.year = self.convertyear(res.year, res.century_specified)
384
385 if ((res.tzoffset == 0 and not res.tzname) or
386 (res.tzname == 'Z' or res.tzname == 'z')):
387 res.tzname = "UTC"
388 res.tzoffset = 0
389 elif res.tzoffset != 0 and res.tzname and self.utczone(res.tzname):
390 res.tzoffset = 0
391 return True
392
393
394class _ymd(list):

Callers 1

_parseMethod · 0.80

Calls 2

convertyearMethod · 0.95
utczoneMethod · 0.95

Tested by

no test coverage detected