It also starts the clock for your boss and your company, kicking off the transition plan of training, hiring, and otherwise covering your impending departure. The bad examples here are all too vague. With the last one, you're aligning yourself with company policy, which is good, but it still doesn't tell the reader how much notice that actually is. Be as specific as possible on the time you have between now and your last day.
How to write an excellent resignation letter. Whatever the language, the sentiment is the same: I'm outta here. However, as a professional person, you need to express that maturely and firmly__ideally, one that doesn't alienate anyone at the job you're leaving. I'm sure we all have that fantasy where we tell off everyone who wronged us on the way out the door, but that person in the fantasy/movie/TV show never seems to have to live with the consequences afterward.