I have had both shoulders replaced -- which is about the most invasive shoulder surgery a person can have. In my experience, the answer to your question is, "It depends."
For example:
Which shoulder is it? There is a significant difference between draw shoulder and bow shoulder recovery time.
What kind of surgery? Is it arthroscopic or open?
Why are you having the surgery? Bone spur removal, worn cartilage, torn rotator cuff, etc.
There are so many variables. If you provide more information we can perhaps guide you a bit.