Do you have a visa or an Extension of Stay? If you are still on your original non-B visa, you can stay until the date you've been stamped in to. However, if you are on an Extension of Stay based on work, you have to leave the day the Extension is cancelled, unless you buy an Extension which will be refused, but you'll get 7 days extra.