of unemployment compensation under State or Federal law, or (ii) was unemployed and would have been so in receipt but for having exhausted the right to such unemployment compensation during such period, . (3) Limitation Subsection (c) of section 3221 of such Code is amended by adding at the end the following new paragraph: (6) Limitation The aggregate reduction in tax imposed under subsection (a) by reason of paragraph (1) with respect to each qualified individual in the employer’s employ shall not exceed $5,000. . (d) Special rule for certain calendar quarters For purposes of section 3111(d) and 3221(c) of such Code, if the day after the date of the enactment of this Act is not the first day of a calendar quarter, then rules similar to the rules of section 3111(d)(5) and 3221(c)(5) of such Code, respectively, shall apply with respect to the last calendar quarter beginning before such day. (e) Effective dates (1) In general Except as provided in paragraph (2), the amendments made by this subsection shall apply to wages paid after the date of the enactment of this Act. (2) Railroad retirement taxes The amendments made by subsection (c) shall apply to compensation paid after the date of the enactment of this Act.