Hadith 1903

حَدَّثَنَا أَحْمَدُ بْنُ عَبْدِ الرَّحْمَنِ بْنِ وَهْبٍ ، حَدَّثَنَا عَمِّي ، أَخْبَرَنِي عَمْرُو بْنُ الْحَارِثِ ، عَنْ بُكَيْرٍ وَهُوَ ابْنُ عَبْدِ اللَّهِ بْنِ الأَشَجِّ ، عَنْ يَزِيدَ مَوْلَى سَلَمَةَ وَهُوَ ابْنُ أَبِي عُبَيْدٍ ، عَنْ سَلَمَةَ بْنِ الأَكْوَعِ ، قَالَ : " كُنَّا فِي رَمَضَانَ فِي عَهْدِ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، مَنْ شَاءَ صَامَ ، وَمَنْ شَاءَ أَفْطَرَ ، وَافْتَدَى بِإِطْعَامِ مِسْكِينٍ ، حَتَّى أُنْزِلَتِ الآيَةُ : فَمَنْ شَهِدَ مِنْكُمُ الشَّهْرَ فَلْيَصُمْهُ سورة البقرة آية 185 "
Sayyiduna Salamah bin Akwa’ (may Allah be pleased with him) narrates that during the time of the Messenger of Allah (peace and blessings be upon him), in the month of Ramadan, whoever wished would fast and whoever wished would leave the fast, and would feed a poor person as compensation. Until this verse was revealed « فَمَن شَهِدَ مِنكُمُ الشَّهْرَ فَلْيَصُمْهُ » [ سورة البقرة : 185 ] “So whoever among you is present in the month (at home), he should fast in it.”
Hadith Reference صحيح ابن خزيمه / 1903
Hadith Takhrij صحيح بخاري