I usually assume the phones will keep working as long as we can charge them, but I suppose the towers need some juice too.
It was interesting to observe when the power went out in Redmond, WA for two weeks about ten years ago. Towers stayed online for a while, until some (I'm guessing) lost their batteries. Still had a little signal, though, because (again, guessing) some towers had generators. Then the diesel ran out (again, guessing), and we had no cell signal after a few days.
That's why I keep the amateur radio skills practiced.