Refactor iso_date for testing and added test