MCPcopy
hub / github.com/pyload/pyload / _parse_date_onblog

Function _parse_date_onblog

module/lib/feedparser.py:3072–3081  ·  view source on GitHub ↗

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

(dateString)

Source from the content-addressed store, hash-verified

3070 re.compile(u'(\d{4})-(\d{2})-(\d{2})\s+(%s|%s)\s+(\d{,2}):(\d{,2}):(\d{,2})' % \
3071 (_korean_am, _korean_pm))
3072def _parse_date_onblog(dateString):
3073 '''Parse a string according to the OnBlog 8-bit date format'''
3074 m = _korean_onblog_date_re.match(dateString)
3075 if not m: return
3076 w3dtfdate = '%(year)s-%(month)s-%(day)sT%(hour)s:%(minute)s:%(second)s%(zonediff)s' % \
3077 {'year': m.group(1), 'month': m.group(2), 'day': m.group(3),\
3078 'hour': m.group(4), 'minute': m.group(5), 'second': m.group(6),\
3079 'zonediff': '+09:00'}
3080 if _debug: sys.stderr.write('OnBlog date parsed as: %s\n' % w3dtfdate)
3081 return _parse_date_w3dtf(w3dtfdate)
3082registerDateHandler(_parse_date_onblog)
3083
3084def _parse_date_nate(dateString):

Callers

nothing calls this directly

Calls 3

_parse_date_w3dtfFunction · 0.85
matchMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected