I went back to work after five weeks, both times and needed clearance from the doctor's office before I was allowed back, due to legal reasons.
The home physical therapist and home nurse also had to sign off on it.
The arrangement I made was to take a week's vacation, then go on long term disability insurance for four weeks. This paid my salary.
Outside of the wages and such, another consideration was my career. For the second, I was in charge of a large engineering effort, and was asked to defer my surgery to when convenient. I ultimately told them that I wouldn't. Another engineer was put in charge, who I trained to take over.
It was a nervous situation for me, since I'm a type A to the max. Ultimately, I went against my grain and decided to choose me. There are not many times that we can do something good for ourselves, seems like the choices are to improve things for your family, friends, etc.
It's good in this to take an extra look and see if in your choice, there's not the chance for some extra time.
If not, I get it and it's your best decision that counts. So long as the hip is allowed to heal well.
I also work an office job and made sure to get up every twenty minutes or so to walk and move. I set a repeating alarm to do so, since I zone out and suddenly hours go by.