All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
When one makes a vow to fast one month, his vow falls under one of the following cases:
First, to make a vow to fast on a specific month such as Rajab or Sha‘baan.
Second, to make a vow to fast one month starting from the time the vow was made.
The person should observe the fast successively in the two aforesaid cases.
Third, he may make a vow to fast thirty days without specifying a particular month. Scholars held two opinions in this regard:
1) Some believed that it is incumbent on the person in such a case to fast the month successively and this is the opinion of the Hanbali scholars.
2) Others believed that he is not obliged to fast the month in succession unless he intends otherwise while making the vow. This is opinion of the Hanafi, Shaafi‘i, and Maaliki scolars.
According to the opinion of the majority of Muslim scholars, the person in this case has the choice either to fast the month successively or intermittently. If he chooses to fast the month intermittently, he should fast thirty days. If he chooses to fast the month successively, he should fast a whole lunar month. If he starts fasting on the first day of a given lunar month, he should observe fasting until this month ends, even if it is only 29 days. If he starts fasting on any day of the month, he should continue fasting until he completes thirty days as he had vowed.
Allaah Knows best.