Sayyiduna Ali (may Allah be pleased with him) says that if a man enters the morning in a state of janabah and wishes to fast, he may do so.