MCPcopy Index your code
hub / github.com/pyload/pyload / _parse_date

Function _parse_date

module/lib/feedparser.py:3356–3370  ·  view source on GitHub ↗

Parses a variety of date formats into a 9-tuple in GMT

(dateString)

Source from the content-addressed store, hash-verified

3354registerDateHandler(_parse_date_perforce)
3355
3356def _parse_date(dateString):
3357 '''Parses a variety of date formats into a 9-tuple in GMT'''
3358 for handler in _date_handlers:
3359 try:
3360 date9tuple = handler(dateString)
3361 if not date9tuple: continue
3362 if len(date9tuple) != 9:
3363 if _debug: sys.stderr.write('date handler function must return 9-tuple\n')
3364 raise ValueError
3365 map(int, date9tuple)
3366 return date9tuple
3367 except Exception, e:
3368 if _debug: sys.stderr.write('%s raised %s\n' % (handler.__name__, repr(e)))
3369 pass
3370 return None
3371
3372def _getCharacterEncoding(http_headers, xml_data):
3373 '''Get the character encoding of the XML document

Callers 6

_end_publishedMethod · 0.85
_end_updatedMethod · 0.85
_end_createdMethod · 0.85
_end_expirationdateMethod · 0.85
_build_urllib2_requestFunction · 0.85
parseFunction · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected