Various changes.
[python_utils.git] / dateparse / dateparse_utils.py
index cd8bc3543513d147b030c5303424964aaa49b5b9..e5e7e76b2a7016cc2142beebbdda3694e879a396 100755 (executable)
@@ -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)