Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ad575f50
authored
2021-04-23 10:55:53 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix long date
1 parent
779dbb1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
src/common/tools/comparison.py
src/common/tools/comparison.py
View file @
ad575f5
...
...
@@ -76,7 +76,10 @@ class Comparison:
if
not
isinstance
(
input_str
,
str
)
or
not
isinstance
(
ocr_str
,
str
):
return
self
.
RESULT_NA
,
ocr_str
if
kwargs
.
get
(
'long'
,
False
)
and
'长期'
in
ocr_str
:
return
self
.
RESULT_Y
,
'2099-12-31'
if
input_str
==
'2099-12-31'
or
input_str
==
'2099-01-01'
:
return
self
.
RESULT_Y
,
'2099-12-31'
else
:
return
self
.
RESULT_N
,
'2099-12-31'
if
kwargs
.
get
(
'ocr_split'
,
False
):
if
'至'
in
ocr_str
:
ocr_str
=
ocr_str
.
split
(
'至'
)[
-
1
]
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment