the taxpayer for the preceding taxable year, the credits allowed under sections 24(d) and 32 of the Internal Revenue Code of 1986 may, at the election of the taxpayer, be determined by substituting— (A) such earned income for the preceding taxable year, for (B) such earned income for the taxable year which includes the applicable date. In the case of a resident of Puerto Rico determining the credit allowed under section 24(d)(1)(B)(ii) of such Code, the preceding sentence shall be applied by substituting social security taxes (as defined in section 24(d)(2)(A) of the Internal Revenue Code of 1986) for earned income each place it appears. (2) Qualified individual For purposes of this subsection— (A) In general The term qualified individual means any qualified Hurricane Harvey individual, any qualified Hurricane Irma individual, and any qualified Hurricane Maria individual. (B) Qualified Hurricane Harvey individual The term qualified Hurricane Harvey individual means any individual whose principal place of abode on August 23, 2017, was located— (i) in the Hurricane Harvey disaster zone, or (ii) in the Hurricane Harvey disaster area (but outside the Hurricane Harvey disaster zone) and such individual was displaced from such principal place of abode by reason of Hurricane Harvey. (C) Qualified Hurricane Irma individual The term qualified Hurricane Irma individual means any individual (other than a qualified Hurricane Harvey individual) whose principal place of abode on September 4, 2017, was located— (i) in the Hurricane Irma disaster zone, or (ii) in the Hurricane Irma disaster area (but outside the Hurricane Irma disaster zone) and such individual was displaced from such principal place of abode by reason of Hurricane Irma. (D) Qualified Hurricane Maria individual The term qualified Hurricane Maria individual means any individual (other than a qualified Hurricane Harvey individual or a qualified Hurricane Irma individual) whose principal place of abode on September 16, 2017, was located— (i) in the Hurricane Maria