Lol, sorry, but there was, you will not find that written in any law. Getting handed a piece of paper does not change the law, (many embassy websites still mention it, but they are wrong too).
Guessing you don't have a VISA, you have an extension of stay (issued at immigration inside Thailand), therefore, the day your work permit expires, so does your extension of stay. You will therefore need to leave the country that day, or apply for a new extension based on marriage or retirement for example. Also, you need to cancel both your work permit and extension, this will stop you getting a large fine when you apply again.