Upvote:5
Between 1600 and to early 1800s, naval technology didn't change much, so we can speak generally about ships of that whole era. How long repairs would take depends on the skill of the people, availability of manpower, availability of tools and material, and availability of suitable dry dock facilities. Finally, it depends on the sort of damage we're talking about. I'll split this up into "structural" and "non-structural".
Non-structural damage is things like sails, masts, rigging, planking, decorations... anything that's not bearing a load. More importantly, all of this can be repaired at sea given the tools and spare parts. Well-stocked vessels would carry tremendous amounts of spares, tools and skilled labor. They would have a skilled carpenter and blacksmith who could fashion new parts. Even damage below the waterline could be repaired, though laboriously.
Structural damage includes damage to the keel and the ship's knees. Such damage will deform the whole ship and cannot be fully repaired without taking the weight off them in dry dock. At sea, many stopgap solutions can be used to shore up failing structural elements including concrete!
I'm currently looking for any data about how long ships of that era were laid up in dry dock, or for contemporary ship logs which mention repairs. I will mark this as community wiki to allow others to add citations as they find them.