This may be changed by the new Tax Act. See Tax Act . The issue revolves around whether the old home was your primary residence at the time of the sale. If one spouse is out of the home, especially for an extended period, especially if a Court Order has been obtained to keep that spouse out of the residence, the old home is no longer a primary residence.
H gets an apartment.
Although most people claim this as H's primary residence, that is incorrect, even though H has been living elsewhere for only 6 months. The old home must be your residence at the time of the sale to qualify for 1034. This may be changed by the new Tax Act. See Tax Act .