[nyc] Rent Increase Notices For Month-to-month Rentals Where I Pay A Month's Rent In Advance

I am a month-to-month tenant, and have an agreement where rent for the next month is due a month prior (i.e., July's rent is due June 1st, June's rent was due May 1st). It's a non-regulated apartment.
For non-regulated month-to-month rentals, my understanding is that the landlord needs to give written notice 30days in advance of increasing rent, or terminating the "lease."
If I am paying rent for July on June 1st, can the landlord increase the rent for July on May 31st? The increased amount of rent that I pay will be due June 1st, less than 30days, but the rent will be applied towards July. Is this sufficient notice from the landlord?
Or do they need to give me notice 30days before my next rent payment (e.g., a notice on May 31st to increase rent due on July 1st, which will be applied to August's rent).
I've been looking at NY's residential tenants' rights guide for reference
Thank you in advance.
[link] [comments]