For purposes of this chapter, in determining the number of qualifying quarters of coverage under title II of the Social Security Act [42 U.S.C. 401 et seq.] an alien shall be credited with—
(1) all of the qualifying quarters of coverage as defined under title II of the Social Security Act worked by a parent of such alien before the date on which the alien attains age 18, and
(2) all of the qualifying quarters worked by a spouse of such alien during their marriage and the alien remains married to such spouse or such spouse is deceased.
(Pub. L. 104–193, title IV, § 435, Aug. 22, 1996, 110 Stat. 2275; Pub. L. 105–33, title V, § 5573, Aug. 5, 1997, 111 Stat. 641.)