of subparagraph (A) of such subsection which precedes clause (i) thereof for purposes of applying such subsection. (B) Corporations In the case of a corporation— (i) Limitation Any qualified contribution shall be allowed only to the extent that the aggregate of such contributions does not exceed the excess of the taxpayer’s taxable income over the amount of all other charitable contributions allowed under such paragraph. (ii) Carryover Rules similar to the rules of subparagraph (A)(ii) shall apply for purposes of this subparagraph. (3) Qualified contributions (A) In general For purposes of this subsection, the term qualified contribution means any charitable contribution if— (i) such contribution— (I) is made for relief efforts in one or more qualified disaster areas, and (II) is paid during the period beginning on the first day of the incident period for any such disaster, and ending on December 31 of the year in which such incident period begins, in cash to an organization described in subsection (b)(1)(A), (ii) the taxpayer obtains from such organization contemporaneous written acknowledgment that such contribution was used (or is to be used) for relief efforts described in clause (i)(I), and (iii) the taxpayer has elected the application of this subsection with respect to such contribution. (B) Exception Such term shall not include a contribution by a donor if the contribution is— (i) to an organization described in section 509(a)(3), or (ii) for the establishment of a new, or maintenance of an existing, donor advised fund (as defined in section 4966(d)(2)). (C) Application of election to partnerships and s corporations In the case of a partnership or S corporation, the election under subparagraph (A)(iii) shall be made separately by each partner or shareholder. (4) 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) Special rules for