Good and Bad news
I had to quit smoking also before my surgery, but I wanted to better my health and have the surgery so much that when I finished smoking the last cigarette I had, I said "That's It!" and haven't had a cigarette since then and it's been almost 2 years now since I quit. I think quitting was the hardest thing I ever did. I still crave a cigarette every now and then but I feel so much better smoke free and 100 pounds lighter! The bright side to quitting just before surgery, you don't gain the weight from quitting! Good luck to you on your journey to a new and healthier life style!
Quitting smoking was the hardest thing... until I gave up sugar. I had no idea how much of an actual drug sugar was to me. I'm even talking natural sugars (fruit, etc.). Just take this one challenge and hit it head on! You can totally do this.
Tips that worked for me: there's tons of quit smoking apps for your phone. I used one that showed me how many days it had been and, more importantly, how much money I saved by not smoking. I live in city of Chicago and when I quit smoking a few (3+) years ago I was paying $12.51 a pack for cigarettes. With the money I saved in ONE year, I was able to book a vacation to MONACO. Set a goal, have a dream and let it rip!
Stay strong! It's the single BEST thing you can do to ensure you aren't killing yourself slowly.