For the purpose of determining eligibility for retirement or transfer to the Fleet Reserve or Fleet Marine Corps Reserve, entitlement to retired or retainer pay, and years of service in computing retired or retainer pay of a member of the armed forces, any service which would be creditable but for the fact that it was performed by him under an enlistment or induction entered into before he attained the age prescribed by law for that enlistment or induction, shall be credited.