The amendments made by this section shall apply to months beginning after December 31, 2018, in taxable years ending after such date. 3. Contributions permitted if spouse has a health flexible spending account (a) Contributions permitted if spouse has a health flexible spending account Section 223(c)(1)(B) of the Internal Revenue Code of 1986 is amended by striking and at the end of clause (ii), by striking the period at the end of clause (iii) and inserting , and , and by inserting after clause (iii) the following new clause: (iv) coverage under a health flexible spending arrangement of the spouse of the individual for any plan year of such arrangement if the aggregate reimbursements under such arrangement for such year do not exceed the aggregate expenses which would be eligible for reimbursement under such arrangement if such expenses were determined without regard to any expenses paid or incurred with respect to such individual. . (b) Effective date The amendment made by this section shall apply to plan years beginning after December 31, 2018. 4. FSA and HRA terminations or conversions to fund HSAs (a) In general Section 106(e)(2) of the Internal Revenue Code of 1986 is amended to read as follows: (2) Qualified HSA distribution For purposes of this subsection— (A) In general The term qualified HSA distribution means, with respect to any employee, a distribution from a health flexible spending arrangement or health reimbursement arrangement of such employee directly to a health savings account of such employee if— (i) such distribution is made in connection with such employee establishing coverage under a high deductible health plan (as defined in section 223(c)(2)) after a significant period of not having such coverage, and (ii) such arrangement is described in section 223(c)(1)(B)(iii) with respect to the portion of the plan year after such distribution is made. (B) Dollar limitation The aggregate amount of distributions from health flexible spending arrangements and health reimbursement arrangements of any