Fixed inDay function!