Wrote inDay function body