Extracting valid date string logic into a method.

https://github.com/skillstream/time_splitter/pull/2#discussion_r17053538