Section 121 Capital Gain

I have question regarding capital gains on section 121. My fiancé and I purchased house on 07/01/20. I got offered a new job and will be moving to a different state in 06/01/2022 (so less than 2 years - 23 months to be exact). We don’t plan on selling house until 07/01/2022. Would my exclusion limit be (23 months/24 months) * $250,000 = $239,583 since 1. Fiancé and I won’t be married until middle of June 2020 and 2. Even though the house we are selling will close on 07/01/2022 (which would be 2 year mark), we only technically lived at property as primary residence for 23 months?