In the case of AHV, the entire years of marriage are split.
The occupational pension entitlements accrued during the marriage up to the time the divorce proceedings are initiated are offset in the event of divorce. Any resulting gaps can be bought in again.