This is an old common law rule. You need to give notice one month before the first day of your lease period. Even if you want to move on May 6th, you need to give notice by April 1st (I am assuming that your lease runs on the first day of each month).