calculating time for week day