If you maintain a permanent place of abode in New York City and spend 184 days or more in the city during the calendar year, you may be considered a New York City resident for income tax purposes. Any part of a day generally counts as a full day.

New York State Department of Taxation and Finance — NYC residency rules: https://www.tax.ny.gov/pit/file/nonresident-faqs.htm