York served as the temporary capital of the Continental Congress from September 30, 1777, to June 27, 1778, during the American Revolutionary War (1775–1783). Congress drafted and adopted the Articles of Confederation in York, though they were not ratified until March 1781.