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

Method validate

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

Source from the content-addressed store, hash-verified

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

Callers 1

_parseMethod · 0.80

Calls 2

convertyearMethod · 0.95
utczoneMethod · 0.95

Tested by

no test coverage detected