Before 2011, Parliament sat for anything up to five years. This was a maximum: the prime minister could, and often did, choose an earlier time to dissolve parliament, with the permission of the monarch. Since the Fixed-term Parliaments Act 2011, the term has been fixed at five years. However, an early general election can be brought about ("inter alia") by the approval of MPs holding at least two-thirds of all seats (whether vacant or entitled to vote, or not) or by a vote of no confidence in the government that is not followed within fourteen days by a vote of confidence (which may be for confidence in the same government or in a different one). By the second of these mechanisms, the UK's government can change its political composition without an intervening general election. As at 31 October 2019, four of the nine last prime ministers have attained office as the immediate result of a general election; the others have gained office upon the resignation of a prime minister of their own party.