I was out for a month and so grateful to have it because I was exhausted in the beginning. Needed to take naps in the middle of the day, which I'd never done in my adult life. Healing will drain you, especially because you barely consume any calories in the first few weeks. Sleep all you can, your body will thank you!
It depends on what you do. I have the luxury of a desk job and I work from home. I was out 3 days, and then eased back in over another week. If you have a physical job, I would guess you will need about 4 weeks... and maybe ease in after that.
I had the surgery on a Wednesday. And returned back to work the following Monday. I was able to recover fast because I was younger than average patient, and I lost a lot of weight pre-op, and had a walking regimen down.