ad575f50 by 周伟奇

fix long date

1 parent 779dbb1a
...@@ -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 if input_str == '2099-12-31' or input_str == '2099-01-01':
79 return self.RESULT_Y, '2099-12-31' 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]
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!