See Maimonides, Mishneh Torah, Hamada’, Avodat Kokabim 3, 10.