(1). Paragraph (1) shall apply to such new principal residence during the recapture period in the same manner as if such new principal residence were the converted residence. (C) Transfers between spouses or incident to divorce In the case of a transfer of a residence to which section 1041(a) applies— (i) paragraph (1) shall not apply to such transfer, and (ii) in the case of taxable years ending after such transfer, paragraph (1) shall apply to the transferee in the same manner as if such transferee were the transferor (and shall not apply to the transferor). (D) Special rule for members of the armed forces, etc (i) In general In the case of the disposition of a principal residence by an individual (or a cessation referred to in paragraph (1)) after December 31, 2021, in connection with Government orders received by such individual, or such individual’s spouse, for qualified official extended duty service, paragraph (1) and subsection (d)(2) shall not apply to such disposition (or cessation). (ii) Qualified official extended duty service For purposes of this section, the term qualified official extended duty service means service on qualified official extended duty as— (I) a member of the uniformed services, (II) a member of the Foreign Service of the United States, or (III) an employee of the intelligence community. (iii) Definitions Any term used in this subparagraph which is also used in paragraph (9) of section 121(d) shall have the same meaning as when used in such paragraph. (E) Disposition of residence in connection with change of employment In the case of the disposition of a principal residence by an individual (or a cessation referred to in paragraph (1)) after December 31, 2021 in connection with a change of employment which meets the conditions described in section 217(c), paragraph (1) shall not apply to such disposition (or cessation). (5) Joint returns In the case of a credit allowed under subsection (a) with respect to a joint return, half of such credit shall be treated as having been allowed