Adjusted get_first_date to be more unit testable.
Added get_first_date unit test.