Except as provided in Section 19781, a permanent, probationary, or exempt employee who begins active duty within 90 calendar days from the effective date of his or her long-term military leave or within 10 calendar days from the effective date of his or her short-term or emergency military leave and who returns to state service within six months after termination of military service under his or her long-term military leave or within 10 days after termination of military service under his or her short-term or emergency military leave shall be reinstated to his or her former position. Reinstatement to an employee’s former exempt position under this section or Section 19783 shall reestablish the employee’s tenure and civil service reinstatement rights, if any, as they existed immediately prior to his or her military leave pursuant to this section or resignation pursuant to Section 19783. For the purpose of this section any period of rehabilitation afforded by the United States or the state following active duty shall be considered as military service and termination of the state military emergency by the Governor shall be considered termination of military service.