Yeah, timing doesn’t matter.
There is a possible exception for certain kinds of real estate if you do it in a certain way, but for everything else any sale, exchange, or transfer is considered a sale unless it’s to a legally registered charity as a donation with a donation receipt.