(2) Notwithstanding the provisions of subdivision a or b of this section or any other provision of law to the contrary, a member who first joins a public retirement system of the state on or after April first, two thousand twelve shall not be eligible for service retirement benefits hereunder until such member has rendered a minimum of ten years of credited service. c. Notwithstanding any other provision of this section, if a member attains mandatory retirement age, the minimum service requirements specified in this section shall be five years. d. Upon the first day of the month after the attainment of mandatory retirement age, a member shall be separated from service whether or not eligible for service retirement hereunder; provided, however, that this requirement shall not preclude a member from being continued in service beyond such mandatory retirement age pursuant to other applicable provisions of law and provided further, however, that this requirement shall not preclude a school district from permitting a teacher to continue in service to the end of the school year should a teacher attain age seventy within the period September first through June thirtieth of such school year.