[Machine] During Ramadan at the time of the Messenger of Allah ﷺ, whoever wanted to fast (could), and whoever wanted to break their fast (could) and feed a needy person (instead) until the verse was revealed, "So whoever sights [the new moon of] the month, let him fast it." [Quran 2:185]
كُنَّا فِي رَمَضَانَ فِي عَهْدِ رَسُولِ اللهِ ﷺ مَنْ شَاءَ صَامَ وَمَنْ شَاءَ أَفْطَرَ وَافْتَدَى بِطَعَامِ مِسْكِينٍ حَتَّى أُنْزِلَتِ الْآيَةُ {فَمَنْ شَهِدَ مِنْكُمُ الشَّهْرَ فَلْيَصُمْهُ} [البقرة 185]