fixed bug with 'endDate', related from moment's days() method