make date formatter and parser more flexible