You may be aware that newly elected U.S. presidents take office sometime in January—maybe you even know the inauguration occurs on January 20, specifically. What you might not realize is that it’s technically illegal for a president who’s leaving office to continue serving after that date. As the Twentieth Amendment states, “the terms of the President and Vice President shall end at noon on the 20th day of January … and the terms of their successors shall then begin.”

In other words, a presidential term is exactly four years long, down to the hour. In the three cases where January 20 fell on a Sunday (since the 20th Amendment went into effect), the president took the oath of office in a private ceremony on that day, and the public inauguration was held the following day.

Though the four-year term limit has been in the Constitution from the very beginning, January 20 wasn’t always the start and end date. Until 1933, it was March 4. After the Constitutional Convention adopted the Constitution in September 1788, the old government—the Confederation Congress—ceased operations on March 4, 1789 and the Congress of the United States started running things. Getting up to speed took a little longer than expected, and George Washington didn’t end up getting sworn in until April 30. As Binghamton University history professor and provost Donald Nieman writes for The Conversation, March 4 became the official Inauguration Day starting with Washington’s second term.

A painting of George Washington's second inauguration on March 4, 1793, by Jean Leon Gerome Ferris.The Foundation Press, Inc., Library of Congress Prints and Photographs Division // No Known Restrictions on Publication

By the early 20th century, the long delay between officials winning an election and actually starting the job was causing issues—mostly in Congress. Members of Congress were elected in November, but their first session didn’t start until the following December, a whole 13 months later. Furthermore, their second session, which started the December after that, could only last until their terms ended on March 4. So, in the 1930s, Congress passed the 20th Amendment, declaring that congressional terms would begin and end on January 3, about two months after the election.

The president’s inauguration day got shifted to January, too, and the amendment also explained what would happen if a president hadn’t been chosen by that date. The sitting president wouldn’t just stay in office by default—instead, Congress could either appoint someone to serve in the interim, or it could decide on another way to select someone. That person would serve “until a President or Vice president shall have qualified.” Since that’s never happened before, we don’t know exactly what the process would look like.

As for what the president actually does during their last days in office, it’s not all long lunches and lazy walks around the well-kept White House grounds. There are usually plenty of eleventh-hour pardons to make, and it’s tradition for the president to pen a letter to their successor. President Barack Obama also sent a heartfelt email to his whole White House staff, thanking them for their years of support and encouraging them to continue working to uphold democracy.

[h/t The Conversation]