How long do caterpillars stay in a cocoon?

My granddaughter and I put a caterpillar into a glass box (covered with Saran Wrap with holes poked into it) with some twigs and leaves and it built a cocoon in about a day. It’s been there for a couple weeks and I fear that life, as we know it, has ended for that little feller, for reasons unknown. However, I really don’t know how long to keep it before I have to dispose of it. It was some sort of furry yellow guy with a few spiky hairs on its back, maybe 2-3 cm long. I haven’t been able to ID it and I can’t find much info on how long they take to metamorphose to adulthood. Any guides? Any ideas? On the southern shores of Lake Michigan.

Monarchs take about 2 weeks. I don’t know what the range is for all butterflies/moths.

Is this your guy? If so, this is what he’ll turn into.

I can’t find pupal durations for that species, though. (Spilosoma virginica, Virginia Tiger Moth…it has a presence on the south shore of Lake Michigan, though)

Paging Colibri.

Hard to say, but the moth looks familiar, so it could be. In any case, if moths or butterflies stay in their cocoons no more than 3 or 4 weeks, I’m verging on getting rid of it. I just need to know the outside range so that I can safely figure that there will be no metamorphosis here.

Legitimate bump/update:

Two weeks, 4 days. No action. Should I keep it?

Keep it. When I was a kid, I plucked a cocoon (of unknown age) off a tree and placed it in a old cigar box with foliage of various sorts. I looked at it everyday for a couple of weeks, and then forgot about it. Way later (my memory says well over a month, but I was pretty young, so who knows), I noticed the box in my closet and opened it to find a huge and very lively moth. YMMV.