No law against an apartment swap for a week (no monetary compensation) or renting out part of one’s own apartment for under a month, if one is staying there.
Also, I can’t speak to AirBnB/VRBO, but there are plenty of short-term situations on Craigslist (search sublets for “week”, “weekly”, or the name of a month, as in “March” 9-15). Technically illegal, but unless one is an idiot about it and rents to a bunch of annoying party kids or an axe murderer, no one will say anything about it.
The good thing about NYC is that if it doesn’t annoy anyone, it’s generally tolerated with the exception of occasional well-publicized crackdowns that go away after a while. Witness every new mayor since Lindsay trying to fine jaywalkers, and the campaigns mercifully going away after a few weeks of unpleasantness.