MCPcopy Index your code
hub / github.com/clips/pattern / _parse_date_greek

Function _parse_date_greek

pattern/web/feed/feedparser.py:3295–3306  ·  view source on GitHub ↗

Parse a string according to a Greek 8-bit date format.

(dateString)

Source from the content-addressed store, hash-verified

3293 re.compile(u'([^,]+),\s+(\d{2})\s+([^\s]+)\s+(\d{4})\s+(\d{2}):(\d{2}):(\d{2})\s+([^\s]+)')
3294
3295def _parse_date_greek(dateString):
3296 '''Parse a string according to a Greek 8-bit date format.'''
3297 m = _greek_date_format_re.match(dateString)
3298 if not m:
3299 return
3300 wday = _greek_wdays[m.group(1)]
3301 month = _greek_months[m.group(3)]
3302 rfc822date = '%(wday)s, %(day)s %(month)s %(year)s %(hour)s:%(minute)s:%(second)s %(zonediff)s' % \
3303 {'wday': wday, 'day': m.group(2), 'month': month, 'year': m.group(4),\
3304 'hour': m.group(5), 'minute': m.group(6), 'second': m.group(7),\
3305 'zonediff': m.group(8)}
3306 return _parse_date_rfc822(rfc822date)
3307registerDateHandler(_parse_date_greek)
3308
3309# Unicode strings for Hungarian date strings

Callers

nothing calls this directly

Calls 3

_parse_date_rfc822Function · 0.85
matchMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…