of subparagraph (A) of such section which precedes clause (i) thereof for purposes of applying such section. (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 (as determined under paragraph (2) of section 170(b) of such Code) 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 (as defined in section 170(c) of the Internal Revenue Code of 1986) if— (i) such contribution— (I) is paid during the period beginning on February 7, 2018, and ending on December 31, 2018, in cash to an organization described in section 170(b)(1)(A) of such Code, and (II) is made for relief efforts in one or more qualified disaster areas, (ii) the taxpayer obtains from such organization contemporaneous written acknowledgment (within the meaning of section 170(f)(8) of such Code) that such contribution was used (or is to be used) for relief efforts described in clause (i)(II), 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) of the Internal Revenue Code of 1986, or (ii) for the establishment of a new, or maintenance of an existing, donor advised fund (as defined in section 4966(d)(2) of such Code). (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. (b) Special rules for qualified disaster-Related personal casualty losses (1) In