Removed unnecessary nested date creation in sanitizeTask().