Answer
Wa`alaykum as-salam wa rahmatullahi wa barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- Fasting in the second part of the month of Shaban is a controversial issue among Muslim jurists.
2- According to the Hanbali School, it is makruh (disliked).
3- For the Shafi`i School, it is haram (forbidden).
4- The majority of Muslim jurists state that it is permissible.
5- Hence, it is better for the person to avoid fasting in the second half of the month of Shaban unless the person himself is accustomed to fast regular days such as Mondays and Thursdays of every week, or when a person is obliged to make up for missed days of Ramadan before the new Ramadan begins.
Answering your question, the Fatwa Center at Islam Q and A, states:
Abu Hurairah (may Allah be pleased with him) reported that the Messenger of Allah (peace be upon him) said: “When Shaban is half over, do not fast.” (Classed as authentic by Al-Albani)
This hadith indicates that it is not allowed to fast after halfway through Shaban, i.e., starting from the sixteenth day of the month.
However, there are reports which indicate that it is permissible to fast at this time.
Abu Hurairah said: The Messenger of Allah said: “Do not anticipate Ramadan by fasting one or two days before it begins, but if a man habitually fasts, then let him fast.” (Al-Bukhari and Muslim)
This indicates that fasting after halfway through Shaban is permissible for someone who has the habit of fasting, such as a person who regularly fasts on Mondays and Thursdays, or who fasts alternate days, and the like.
Aishah (may Allah be pleased with her) said: “The Messenger of Allah used to fast all of Shaban and he used to fast Shaban except a few days.” (Muslim)
Imam An-Nawawi said: In the words, “He used to fast all of Shaban, and he used to fast Shaban except a few days” the second phrase explains the first, and indicates that the word “all” means “most of”.
The above hadith indicates that it is permissible to fast after halfway through Shaban, but only for those who are continuing after fasting in the first half of the month.
The Shafi`i School followed all of these hadiths and said: It is not permissible to fast after halfway through Shaban except for those who have a habitual pattern of fasting, or who are continuing after fasting before halfway through the month.
According to some scholars, the prohibition here means that it is haram. (See Al-Majmu`, 6/399-400; Fath Al-Bari 4/129)
Some, such as Al-Ruyani, suggested that the prohibition here is to be understood as meaning that it is makruh but not haram.
In Riyadh As-Saliheen (p. 412), Imam An-Nawawi has a chapter entitled: “On the prohibition on anticipating Ramadan by fasting after halfway through Shaban, except for one who is continuing after fasting before halfway through the month or who has a regular pattern of fasting such as fasting on Mondays and Thursdays”.
Some scholars are of the view that the hadith which forbids fasting after halfway through Shaban is weak, and based on that they said that it is not makruh to fast after halfway through Shaban.
Al-Hafizh said: The majority of scholars said that it is permissible to observe voluntary fasts after halfway through Shaban and they regarded the hadith concerning that as weak. Also, among those who classed it as weak were Al-Bayhaqi and At-Tahawi.
Ibn Qudamah said in Al-Mughni that Imam Ahmad said concerning this hadith: “It is not sound. We asked `Abd Ar-Rahman Ibn Mahdi about it and he did not class it as authentic, and he did not narrate it to me. He used to avoid talking about this hadith.
Ibn Al-Qayyim said: “With regard to those who think that there is a contradiction between this hadith and the hadiths which speak of fasting in Shaban, there is no contradiction. Those hadiths speak of fasting half of it along with the previous half, and of habitual fasting during the second half of the month, whereas the hadith speaks of the prohibition of fasting deliberately only after the month is halfway over, not about fasts that a person observes regularly or that are a continuation after fasting during the first part of the month.
The late prominent Saudi scholar Sheikh Ibn Baz was asked about the hadith which says that fasting after halfway through Shaban is not allowed, and he said: This is an authentic hadith as Sheikh Nasir Ad-Deen Al-Albani said. What is meant is that it is not allowed to start fasting after halfway through the month. But if a person fasts most or all of the month, then he is following the Sunnah. (Majmu` Fatawa Ash-Shaykh Ibn Baz 15/385)
Moreover, the prominent Saudi scholar Sheikh Ibn Uthaymeen said in his commentary on Riyadh As-Saliheen (3/394):
Even if the hadith is authentic, the prohibition in it does not mean that this is haram, rather it is simply makruh, as some of the scholars have understood it to mean so. But whoever has the habit of fasting regularly should fast, even if it is after halfway through Shaban.
Allah Almighty knows best.