endDate should be included in return value

That's why I recommend to set time to return value