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

Function _parse_date_nate

module/lib/feedparser.py:3084–3100  ·  view source on GitHub ↗

Parse a string according to the Nate 8-bit date format

(dateString)

Source from the content-addressed store, hash-verified

3082registerDateHandler(_parse_date_onblog)
3083
3084def _parse_date_nate(dateString):
3085 '''Parse a string according to the Nate 8-bit date format'''
3086 m = _korean_nate_date_re.match(dateString)
3087 if not m: return
3088 hour = int(m.group(5))
3089 ampm = m.group(4)
3090 if (ampm == _korean_pm):
3091 hour += 12
3092 hour = str(hour)
3093 if len(hour) == 1:
3094 hour = '0' + hour
3095 w3dtfdate = '%(year)s-%(month)s-%(day)sT%(hour)s:%(minute)s:%(second)s%(zonediff)s' % \
3096 {'year': m.group(1), 'month': m.group(2), 'day': m.group(3),\
3097 'hour': hour, 'minute': m.group(6), 'second': m.group(7),\
3098 'zonediff': '+09:00'}
3099 if _debug: sys.stderr.write('Nate date parsed as: %s\n' % w3dtfdate)
3100 return _parse_date_w3dtf(w3dtfdate)
3101registerDateHandler(_parse_date_nate)
3102
3103_mssql_date_re = \

Callers

nothing calls this directly

Calls 3

_parse_date_w3dtfFunction · 0.85
matchMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected