When can you swim after giving birth?

I’m due in a few days and I’ve been told by my mil I can’t swim for 6 weeks. That means the rest of the summer here. Is this true? It’s a clean pool with chlorine and everything. Why can’t you swim after?