The government shutdown is now in day 31, setting the record for the longest shutdown in the modern era.

There appears to be no end in sight as President Donald Trump and Democrats dig in on their border wall stances.

As the shutdown drags on, more federal workers and agencies become affected.

Here's your rundown on how the government ended up in a shutdown and where we go from here.

President Donald Trump and congressional Democrats seem to be dug in over the government shutdown, and after 31 days without a funding bill, there's no end in sight.

At the heart of the dispute is Trump's demand for just over $5 billion toward a long-promised wall along the US-Mexico border. Democrats insist they will allocate no money toward a wall.

Prior to the start of the shutdown in December, Trump agreed to a short-term funding extension with no money for a wall. But after pushback from conservative pundits, the president suddenly reversed his position and forced the federal government into a shutdown.

As of Saturday the shutdown is also now the longest of the modern era, breaking the record set by the the 1995-1996 shutdown.

Read more: Here's a history of all the previous shutdowns in the modern era»

The shutdown only affects part of the federal government, as seven of the 12 bills that fund the government were passed in September. But a large number of departments are shuttered, including agriculture, commerce, justice, homeland security, the interior, state, transportation, and housing and urban development.

The problems caused by the shutdown are wide-ranging, from waste piling up in national parks to uncertainty for 800,000 federal workers about when their next paycheck will come. And as the shutdown drags on, the problems caused by the shutdown are expected to keep getting worse.

Read more: Here's what happens to Social Security and disability benefits during a government shutdown»

With all that in mind, here's a rundown of just how we got here:

The pre-shutdown fight

Shutdown kicks in and the Christmas break

December 21 : Trump demands the Senate vote for the House version of the CR and tells Senate Majority Leader Mitch McConnell to get rid of the legislative filibuster in order to pass the vote with only GOP lawmakers, but the idea is a nonstarter. The Senate votes down the House version of the bill, and the government moves closer to a shutdown at the midnight deadline.

: Trump demands the Senate vote for the House version of the CR and tells Senate Majority Leader Mitch McConnell to get rid of the legislative filibuster in order to pass the vote with only GOP lawmakers, but the idea is a nonstarter. The Senate votes down the House version of the bill, and the government moves closer to a shutdown at the midnight deadline. December 22 : McConnell announces in the afternoon that lawmakers have not reached a deal, and adjourns the Senate until December 27. Senior Trump administration officials also suggested to reporters that the White House would not back down on the wall, indicating that only Senate Democrats could end the shutdown by caving on the funding.

: McConnell announces in the afternoon that lawmakers have not reached a deal, and adjourns the Senate until December 27. Senior Trump administration officials also suggested to reporters that the White House would not back down on the wall, indicating that only Senate Democrats could end the shutdown by caving on the funding. January 1: After a relatively quiet Christmas break, Trump suggests Nancy Pelosi should make a deal. " Border Security and the Wall "thing" and Shutdown is not where Nancy Pelosi wanted to start her tenure as Speaker! Let's make a deal?" Trump tweets.

Democrats take control and the shutdown gets real

January 2 : Congressional leaders from both parties meet with Trump at the White House, it is the first face-to-face meeting in three weeks. The president enlists Secretary of Homeland Security Kirstjen Nielsen to make the case for the border wall. Following the meeting, Democratic leaders reiterate that no money will be allocated for the wall.

: Congressional leaders from both parties meet with Trump at the White House, it is the first face-to-face meeting in three weeks. The president enlists January 3: Democrats take over control of the House and Pelosi is elected Speaker. Later in the night, the new Democratic majority passes two bills which would both fund the government that do not include funding for the border wall. The bills even earned a handful of GOP votes. Despite the bills being nearly identical to the measures passed by the Senate before the holiday break, Republican Senate leaders reject the idea of taking up the bills.

Democrats take over control of the House and Pelosi is elected Speaker. Later in the night, the new Democratic majority passes two bills which would both fund the government that do not include funding for the border wall. The bills even earned a handful of GOP votes. Despite the bills being nearly identical to the measures passed by the Senate before the holiday break, Republican Senate leaders reject the idea of taking up the bills. January 4: Congressional leaders meet with Trump at the White House, where the president told Democrats that the shutdown could last for "months or even years" if no border wall money was allocated. Democrats suggested that Trump allow the government to reopen and then fight over the wall.

Shutdown nears history

Digging in and State of the Union fight