Kaynağa Gözat

Update cz.py

One of the MonthVals would through an error when monthval wasn't between 1-12, added a if/else statement before num_days_month variable.
Coder0951 5 yıl önce
ebeveyn
işleme
f3191575ef
1 değiştirilmiş dosya ile 10 ekleme ve 0 silme
  1. 10 0
      pyVat/validators/cz.py

+ 10 - 0
pyVat/validators/cz.py

@@ -114,6 +114,16 @@ class Validator(GenericValidator):
                     and monthval not in range(51, 63) and monthval not in range(71, 83):
                 return False
 
+            if monthval in range(21,33):
+                monthval = monthval - 20
+            elif monthval in range(51,63):
+                monthval = monthval - 50
+            elif monthval in range(71,83):
+                monthval = monthval - 70
+            else:
+                monthval
+            
+            
             year_prefix = str('19')
             if yearval<13:
                 year_prefix = str('20')