closeDay function added.