diff options
| author | Scott Gasch <[email protected]> | 2021-09-07 22:20:40 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2021-09-07 22:20:40 -0700 |
| commit | b10d30a46e601c9ee1f843241f2d69a1f90f7a94 (patch) | |
| tree | 30c95e6f4333b57ff3ae7a4dee278b2097612d10 /dateparse | |
| parent | f49bb9db0c6d1a8622dca1717db68462a4209112 (diff) | |
Various changes.
Diffstat (limited to 'dateparse')
| -rwxr-xr-x | dateparse/dateparse_utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dateparse/dateparse_utils.py b/dateparse/dateparse_utils.py index cd8bc35..e5e7e76 100755 --- a/dateparse/dateparse_utils.py +++ b/dateparse/dateparse_utils.py @@ -194,6 +194,8 @@ class DateParser(dateparse_utilsListener): This is the main entrypoint to this class for caller code. """ + date_string = date_string.strip() + date_string = re.sub('\s+', ' ', date_string) self._reset() listener = RaisingErrorListener() input_stream = antlr4.InputStream(date_string) |
