Lines 1377-1382
class date2(date): # fixes the century
|
Link Here
|
---|
|
1377 |
if text and self._re_de.match(text): |
1377 |
if text and self._re_de.match(text): |
1378 |
day, month, year = map(lambda(x): int(x), text.split('.')) |
1378 |
day, month, year = map(lambda(x): int(x), text.split('.')) |
1379 |
if 0 <= year <= 99 and 1 <= month <= 12 and 1 <= day <= 31: |
1379 |
if 0 <= year <= 99 and 1 <= month <= 12 and 1 <= day <= 31: |
|
|
1380 |
## Workaround for 2.1.1970: don't wrap to 2070: |
1381 |
if year >= 39: # Everything after that has the 2038 problem anyway |
1382 |
return '19%02d-%02d-%02d' % (year, month, day) |
1380 |
return '20%02d-%02d-%02d' % (year, month, day) |
1383 |
return '20%02d-%02d-%02d' % (year, month, day) |
1381 |
raise univention.admin.uexceptions.valueError(_("Not a valid Date")) |
1384 |
raise univention.admin.uexceptions.valueError(_("Not a valid Date")) |
1382 |
|
1385 |
|