Code

Ticket #3879: newrules.diff

File newrules.diff, 792 bytes (added by thebjorn <bp@…>, 7 years ago)

updated rules for assigning numbers

Line 
1Index: forms.py
2===================================================================
3--- forms.py    (revision 4881)
4+++ forms.py    (working copy)
5@@ -46,10 +46,12 @@
6         try:
7             if 000 <= inum < 500:
8                 self.birthday = datetime.date(1900+year2, month, day)
9-            if 500 <= inum < 750:
10+            if 500 <= inum < 750 and year2 > 54:
11                 self.birthday = datetime.date(1800+year2, month, day)
12-            if 500 <= inum < 1000:
13+            if 500 <= inum < 1000 and year2 < 40:
14                 self.birthday = datetime.date(2000+year2, month, day)
15+            if 900 <= inum < 1000 and year2 > 39:
16+                self.birthday = datetime.date(1900+year2, month, day)
17         except ValueError:
18             raise ValidationError(msg)
19