It's not about time
It's about what's happening. For secondary, some claim it's not neededsome claim it's not needed at all. If you think you need it, wait until the foam disappears, and rate of OG drop will slow down significantly, under 1°Blg every two days, I'd say. For starting gravity around 20°Blg I would guess it will be about 3 to 5 weeks.
When to finish secondary? Or fermentation at all if you don't do secondary? Well, for me it's when OG does not change for few days. With high gravity beer - when it does not change for a week
Consider Fast Fermentation Test - take a sample of your wort, add a lot of pressed baking yeast, keep in warm place. See the final gravity after a day or two. It will be around the gravity you should want expect from your beer. if it's higher, but does not continue to fall down, you might have stalled fermentation and bottling might be dangerous.