period of the qualified disaster to which the qualified disaster area referred to in paragraph (2) relates. (4) Definition and special rules (A) Disaster definitions Any term which is used in this subsection and is also defined in section 2 of the Tax Relief and Expedited Assistance for Disasters Act of 2019 shall have the meaning given such term in such section. (B) Application to joint returns For purposes of paragraph (1), in the case of a joint return for an applicable taxable year— (i) such paragraph shall apply if either spouse is a qualified individual, and (ii) the earned income of the taxpayer for the preceding taxable year shall be the sum of the earned income of each spouse for such preceding taxable year. (C) Uniform application of election Any election made under paragraph (1) shall apply with respect to both this section and section 24(d). (D) Errors treated as mathematical error For purposes of section 6213, an incorrect use on a return of earned income pursuant to paragraph (1) shall be treated as a mathematical or clerical error. (E) No effect on determination of gross income, etc Except as otherwise provided in this subsection, this title shall be applied without regard to any substitution under paragraph (1). . (d) Child tax credit Section 24(d) of such Code is amended by inserting after paragraph (2) the following new paragraph: (3) Special rule for determining earned income of taxpayers affected by federally declared disasters For election by qualified individuals with respect to certain federally declared disasters to substitute earned income from the preceding taxable year, see section 32(n). . (e) Effective date The amendments made by this section shall apply to taxable years beginning after December 31, 2017. 6. Treatment of certain possessions (a) Payments to Guam and the Commonwealth of the Northern Mariana Islands The Secretary of the Treasury shall pay to Guam and the Commonwealth of the Northern Mariana Islands amounts equal to the loss to that possession by reason of the