After the involuntary detention has begun, the total period of detention, including intervening periods of voluntary treatment, shall not exceed the total maximum period during which the person could have been detained, if the person had been detained continuously on an involuntary basis, from the time of initial involuntary detention.
Ca. Welf. and Inst. Code § 5258