Why are flags at half-staff, and how long will they stay after Jimmy Carter's death?

Flags around the country continue to be displayed at half-staff on land and half-mast over water in remembrance of former President Jimmy Carter, who died in late December.
Carter, who served in the White House from 1977-1981, had been the oldest living ex-president until his death Dec. 29 at age 100 in his hometown of Plains, Georgia.
While issuing Thursday, Jan. 9 as a national day of mourning in honor of Carter and day off for most federal workers, President Joe Biden also said flags at the White house, public buildings and grounds and at all military posts will be displayed at half-staff.
Ahead of Carter's funeral and memorial, here's what to know about flags at half-staff.
'North star': By promoting peace and justice, Jimmy Carter elevated the role of ex-president
Why are flags at half-staff?
After announcing the national day of mourning set for Jan. 9, Biden said all flags will be displayed at half-staff at the White House and on public buildings and grounds. Flags are also at half-staff at all military posts, naval stations and half-mast on naval vessels.
Private companies and citizens can also display flags at half-staff.
How long will flags stay at half-staff?
The White House ordered public flags to be displayed at half-staff for a period of 30 days from Carter's day of death, who died Dec. 29.
What's the difference between half-staff and half-mast?
Flags are flown at half-mast on ships and at naval stations. On shore, flags are flown at half-staff, meaning the flagpole is attached to a building or stuck in the ground.
What are Jimmy Carter's funeral plans?
After his Dec. 29 death, Carter was lying in repose at the Carter Presidential Center in Georgia. His remains have since traveled to Washington, D.C., where they were lying in state at the United States Capitol rotunda on Tuesday. The public is invited to pay respects from 7 a.m. Jan. 8 until 7 a.m. Jan. 9.
On Thursday, Jan. 9, there will be a national funeral service at the Washington National Cathedral. After, Carter's remains will be transported to his hometown of Plains, Georgia, where a private funeral service will be held for the former president.
Contributing: Gabe Hauari, Fernando Cervantes Jr.
This article originally appeared on USA TODAY: Why are flags at half-staff? What to know after Jimmy Carter's death