fix long date
Showing
1 changed file
with
4 additions
and
1 deletions
... | @@ -76,7 +76,10 @@ class Comparison: | ... | @@ -76,7 +76,10 @@ class Comparison: |
76 | if not isinstance(input_str, str) or not isinstance(ocr_str, str): | 76 | if not isinstance(input_str, str) or not isinstance(ocr_str, str): |
77 | return self.RESULT_NA, ocr_str | 77 | return self.RESULT_NA, ocr_str |
78 | if kwargs.get('long', False) and '长期' in ocr_str: | 78 | if kwargs.get('long', False) and '长期' in ocr_str: |
79 | return self.RESULT_Y, '2099-12-31' | 79 | if input_str == '2099-12-31' or input_str == '2099-01-01': |
80 | return self.RESULT_Y, '2099-12-31' | ||
81 | else: | ||
82 | return self.RESULT_N, '2099-12-31' | ||
80 | if kwargs.get('ocr_split', False): | 83 | if kwargs.get('ocr_split', False): |
81 | if '至' in ocr_str: | 84 | if '至' in ocr_str: |
82 | ocr_str = ocr_str.split('至')[-1] | 85 | ocr_str = ocr_str.split('至')[-1] | ... | ... |
-
Please register or sign in to post a comment