It depends. If this is your first time quitting, it takes a while before you'll experience withdrawal symptoms. But with each successive time you quit, the required use volume and duration for w/d becomes smaller and smaller. Some people are on pain pills for years and quit with no problem; some people have symptoms after a month of moderate use. If you're using heavily that will definitely work against your favor as well.
Yes, it is dependent on the half-life of the opiates. Hydromorphone tends to be the most acute and intense but short lived while methadone is not nearly as acute but can last for around 4-8 weeks depending on your dose/activity level/duration.
How bad they'll be is something we can't tell you. I've found in many years of quits and starts that 80% of withdrawal is mental. If you're not using more than probably 40mgoxy/.3g h/day or somewhere in that range, and you haven't been using for years, it shouldn't be too terrible. Staying engaged and keeping away from boredom is important and there are some things (otc meds, etc) that can help get you through it.