“O you who believe! Observing As-Saum (the fasting) is prescribed for you as it was prescribed for those before you that you, may become Al- Muttaqun (V.2:183).
Narrated `Aisha:The people used to fast on the day of 'Ashura' before fasting in Ramadan was prescribed but when (the order of compulsory fasting in) Ramadan was revealed, it was up to one to fast on it (i.e. 'Ashura') or not.
Reference
Sahih al-Bukhari 4502
In-book reference
Book 65, Hadith 29
USC-MSA web (English)
Vol. 6, Book 60, Hadith 29
Translation by Dr. M. Muhsin Khan · Language: EN
Sahih
Arabic Text
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ، حَدَّثَنَا ابْنُ عُيَيْنَةَ، عَنِ الزُّهْرِيِّ، عَنْ عُرْوَةَ، عَنْ عَائِشَةَ ـ رضى الله عنها ـ كَانَ عَاشُورَاءُ يُصَامُ قَبْلَ رَمَضَانَ، فَلَمَّا نَزَلَ رَمَضَانُ قَالَ " مَنْ شَاءَ صَامَ، وَمَنْ شَاءَ أَفْطَرَ ".