I want to expand on this. More generally, when giving notice one should be prepared for their employment ending immediately after they give notice. I think my employer will pay out two weeks, but they've definitely escorted people out within an hour or so of them giving notice (but paid out two weeks). One coworker gave 24 hour notice, as in "today is my last day," because he was concerned there would be a gap in his family's health insurance. He was later hired back and was recently given a company award. There were no hard feelings.
I gave a two weeks notice at my last job, then they started treating me without respect because I was leaving. So I told them that I was not coming back the next day and it was due to their treatment. Called my new job and they let me start early so no problem. Not everybody gets to do this of course, but it was satisfying.