of the Internal Revenue Code of 1986). (3) Qualified disaster-related personal casualty losses For purposes of this subsection, the term qualified disaster-related personal casualty losses means losses described in section 165(c)(3) of the Internal Revenue Code of 1986 which arise in a qualified disaster area on or after the first day of the incident period of the qualified disaster to which such area relates, and which are attributable to such qualified disaster. (c) Special rule for determining earned income (1) In general In the case of a qualified individual, if the earned income of the taxpayer for the applicable taxable year is less than the earned income of 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 applicable taxable year. (2) Qualified individual For purposes of this subsection— (A) In general The term qualified individual means any individual whose principal place of abode at any time during the incident period of any qualified disaster was located— (i) in the qualified disaster zone with respect to such qualified disaster, or (ii) in the qualified disaster area with respect to such qualified disaster (but outside the qualified disaster zone with respect to such qualified disaster) and such individual was displaced from such principal place of abode by reason of such qualified disaster. (B) Hurricane Sandy The term qualified individual includes any individual whose principal place of abode at any time during the period beginning on October 29, 2012, and ending on November 3, 2012, was located— (i) in that portion of the area described in clause (ii) which was determined by the President to warrant individual or individual and public assistance from the Federal Government under the Robert T. Stafford Disaster Relief and Emergency Assistance Act by reason of