I had been wondering that recently too. It's so hard to find pig information
online since nearly all of it is relative to industry hog growing! Industry standard is 20-21 days. There's a technique called "MEWing". Medicated Early Weening. Where they ween at 4 days old and bomb the piglets with antibiotics so their digestive tracts don't fail from the rapid food transition
We're juggling our first piglets right now. It's super fun! One mama has already weened her piglets at about 2 months old. I think they would've been fine to pull off her 2 weeks ago. The poor girl runs away from her babies and they chase her like a pack of wolves, screaming for
milk! She turns to fight them off and flips them away with her snout. Piggies go FLYING! It's comical and I don't envy her. They've got sharp tusks and they like to bite soft fleshy things with them D:
Our other sow is taking her time weening, but her babies aren't being cruel to her.
I agree that, from my limited experience so far, 4 weeks could be "absolute earliest" if really needed, but 6 weeks is a good time. By 8 weeks they're definitely good.
I read somewhere on a university extension .PDF that sow lactation peaks at 21 days, and by 58 days she's dry, with 35-45 days being the main 'weening' window. That information was helpful to me. I'll see if I can find the .PDF.