revert last change in calendar_date function