the demonstrations lasted for a period of months , not weeks , and only ended by the mandate of the military under the new , and rather self-proclaimed thai prime minister , general prayuth chan-ocha .