Fix an array index out of range if an empty date is passed to valid_date
Merge pull request #11 from hmashlah/fix-out-of-bound

Fix an array index out of range if an empty date is passed to valid_date