Added hasEventAtDate function