Author: mtredinnick
Date: 2007-04-01 00:00:44 -0500 (Sun, 01 Apr 2007)
New Revision: 4888
Modified:
django/trunk/django/contrib/localflavor/no/forms.py
Log:
Fixed #3879 -- Updated Norwegian social security validation rules. Thanks,
[EMAIL PROTECTED]
Modified: django/trunk/django/contrib/localflavor/no/forms.py
===================================================================
--- django/trunk/django/contrib/localflavor/no/forms.py 2007-04-01 04:40:36 UTC
(rev 4887)
+++ django/trunk/django/contrib/localflavor/no/forms.py 2007-04-01 05:00:44 UTC
(rev 4888)
@@ -46,10 +46,12 @@
try:
if 000 <= inum < 500:
self.birthday = datetime.date(1900+year2, month, day)
- if 500 <= inum < 750:
+ if 500 <= inum < 750 and year2 > 54:
self.birthday = datetime.date(1800+year2, month, day)
- if 500 <= inum < 1000:
+ if 500 <= inum < 1000 and year2 < 40:
self.birthday = datetime.date(2000+year2, month, day)
+ if 900 <= inum < 1000 and year2 > 39:
+ self.birthday = datetime.date(1900+year2, month, day)
except ValueError:
raise ValidationError(msg)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---