cleaned up parameter
raise error if closest is invoked on a class with no date
added effective_task_id()
collapsed ifs