Yes. The Consolidated Appropriations Act, 2021, created a one-year opportunity. Use the prior year’s income if it results in a larger earned income tax credit. But don’t if it results in reducing or barring the credit.
The length of time that an asset is owned and that generally determines long- or short-term capital gain treatment.