Cal. Rev. & Tax. Code § 24944
If property (as a result of its destruction in whole or in part, theft, seizure, or requisition or condemnation or threat or imminence thereof) is compulsorily or involuntarily converted into money or into property not similar or related in service or use to the converted property, and the disposition of the converted property (as defined in subdivision (b) of Section 24943) occurred after December 31, 1952, the gain (if any) shall be recognized except to the extent hereinafter provided in this section:
(a) If the taxpayer during the period specified in subdivision (b), for the purpose of replacing the property so converted, purchases other property similar or related in service or use to the property so converted, or purchases stock in the acquisition of control of a corporation owning such other property, at the election of the taxpayer the gain shall be recognized only to the extent that the amount realized upon such conversion (regardless of whether such amount is received in one or more taxable years) exceeds the cost of such other property or such stock. Such election shall be made at such time and in such manner as the Franchise Tax Board may by regulations prescribe. For purposes of this subdivision—
(b) The period referred to in subdivision (a) shall be the period beginning with the date of the disposition of the converted property, or the earliest date of the threat or imminence of requisition or condemnation of the converted property, whichever is the earlier, and ending—