Parse a string according to a Greek 8-bit date format.
(dateString)
| 3153 | re.compile(u'([^,]+),\s+(\d{2})\s+([^\s]+)\s+(\d{4})\s+(\d{2}):(\d{2}):(\d{2})\s+([^\s]+)') |
| 3154 | |
| 3155 | def _parse_date_greek(dateString): |
| 3156 | '''Parse a string according to a Greek 8-bit date format.''' |
| 3157 | m = _greek_date_format_re.match(dateString) |
| 3158 | if not m: return |
| 3159 | try: |
| 3160 | wday = _greek_wdays[m.group(1)] |
| 3161 | month = _greek_months[m.group(3)] |
| 3162 | except: |
| 3163 | return |
| 3164 | rfc822date = '%(wday)s, %(day)s %(month)s %(year)s %(hour)s:%(minute)s:%(second)s %(zonediff)s' % \ |
| 3165 | {'wday': wday, 'day': m.group(2), 'month': month, 'year': m.group(4),\ |
| 3166 | 'hour': m.group(5), 'minute': m.group(6), 'second': m.group(7),\ |
| 3167 | 'zonediff': m.group(8)} |
| 3168 | if _debug: sys.stderr.write('Greek date parsed as: %s\n' % rfc822date) |
| 3169 | return _parse_date_rfc822(rfc822date) |
| 3170 | registerDateHandler(_parse_date_greek) |
| 3171 | |
| 3172 | # Unicode strings for Hungarian date strings |
nothing calls this directly
no test coverage detected