(32) باب مَنْ نَذَرَ أَنْ يَصُومَ أَيَّامًا فَوَافَقَ النَّحْرَ أَوِ الْفِطْرَ
Narrated `Abdullah bin `Umar:
that he was asked about a man who had vowed that he would fast all the days of his life then the day of `Id al Adha or `Id-al-Fitr came. `Abdullah bin `Umar said: You have indeed a good example in Allah's Messenger (ﷺ). He did not fast on the day of `Id al Adha or the day of `Id-al-Fitr, and we do not intend fasting on these two days.
Reference: Sahih al-Bukhari 6705
In-book reference: Book 83, Hadith 82
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 8, Book 78, Hadith 696