Add test for preceeding whitespace
Use .trim to remove trailing and preceeding whitespace

Remove any unwanted whitespace before we run regular expressions over the date