Functionality to handle date strings