Was New York City the capital of United States and if so when?

any information would be appreciated

your Answer