Refactor invjday

Remove mutability from invjday