California's Safe Harbor may treat a California domiciliary as a nonresident when they are outside California under an employment-related contract for an uninterrupted period of at least 546 consecutive days. During each taxable year covered by the contract, return visits to California must not exceed a total of 45 days. Other conditions and exceptions apply, so meeting the 45-day limit alone does not establish nonresident status.
https://www.ftb.ca.gov/tax-pros/procedures/residency-and-sourcing-technical-manual-disclosure.pdf
California Safe Harbor
Up to 45 days in California per tax year