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

Function _parse_date_mssql

module/lib/feedparser.py:3105–3114  ·  view source on GitHub ↗

Parse a string according to the MS SQL date format

(dateString)

Source from the content-addressed store, hash-verified

3103_mssql_date_re = \
3104 re.compile('(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})(\.\d+)?')
3105def _parse_date_mssql(dateString):
3106 '''Parse a string according to the MS SQL date format'''
3107 m = _mssql_date_re.match(dateString)
3108 if not m: return
3109 w3dtfdate = '%(year)s-%(month)s-%(day)sT%(hour)s:%(minute)s:%(second)s%(zonediff)s' % \
3110 {'year': m.group(1), 'month': m.group(2), 'day': m.group(3),\
3111 'hour': m.group(4), 'minute': m.group(5), 'second': m.group(6),\
3112 'zonediff': '+09:00'}
3113 if _debug: sys.stderr.write('MS SQL date parsed as: %s\n' % w3dtfdate)
3114 return _parse_date_w3dtf(w3dtfdate)
3115registerDateHandler(_parse_date_mssql)
3116
3117# Unicode strings for Greek date strings

Callers

nothing calls this directly

Calls 3

_parse_date_w3dtfFunction · 0.85
matchMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected