I didn't try but in theory it is based on the date you redeem the code (from the physical card) into PSN store. If you redeem within the period, you automatically get 4 more months. I don't know if they have batches of codes that are eligible so only recent cards will work. If you have a physical card from years ago that is not redeemed yet (maybe even before the price increase), don't know whether it will give you the extra months.
-----
Based on SG price of S$53.90
- digital: $3.144 per month (for 12 months)
- physical: $3.369 per month (for 16 months)
For physical card, you pay 20 cents more each month but you enjoy 4 more months of discounted price. But then, for digital, within the next 12 months, surely there will be a similar sale, so you can still enjoy more discounted months by buying later (or just get 2 years now).
By the way, in case it is not clear, you can buy more than one 12-month subscription digitally (or redeem more than one card). If you currently have active PS+ subscription and buy more, it will just add to your subscription and extend the expiry date accordingly (by the full duration you bought). You don't forfeit the remainder of your current subscription when you add a new one. Don't have to wait until your subscription expires before buying. Just buy when there is a good sale, like now. And remember to turn off auto-renewal. You want to control when you buy the next subscription (like when there's a good sale) instead of automatically renewing at full price.