(a)
A party may amend its pleading once without leave of the court at any time before the answer or demurrer is filed, or after a demurrer is filed but before the demurrer is heard if the amended complaint, cross-complaint, or answer is filed and served no later than the date for filing an opposition to the demurrer. A party may amend the complaint, cross-complaint, or answer after the date for filing an opposition to the demurrer, upon stipulation by the parties. The time for responding to an amended pleading shall be computed from the date of service of the amended pleading.
(b)
This section shall remain in effect only until January 1, 2021, and as of that date is
repealed, unless a later enacted statute, that is enacted before January 1, 2021, deletes or extends that date.