Stocks owned longer than a fiscal periode, became sharia non-compliant beginning of next fiscal periode

In short I want to know how I should purify my investments made for stocks that became sharia non compliant this year (2023), but I have had them since 2022 (and were sharia compliant).

I have read the faq’s and I saw the following:

Now I want to know do I need to purify only the gains made since the beginning of this fiscal periode or also the gains of the previous fiscal periode (in the scenario that the business screen failed for this periode)? It is confusing for me because how I understand the text is, either you buy and sell the share the same year => no purification needed or you hold them longer than a fiscal periode and you need to purify it. So stocks bought in a previous fiscal periode fall under the second option?

Jazak Allah Khair