The best way to find out is to head to the local immigration office and ask.
One important thing to remember is that thai immigration offices all seem to have their own interpretation of the rules. Chiang Mai might tell you something different from Chiang Rai, for example. Anything you learn here might not apply in your area.