changed endDate implementation on ios to spec