“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). Sahih al-Bukhari 4503

Arabic hadith text
حَدَّثَنِي مَحْمُودٌ، أَخْبَرَنَا عُبَيْدُ اللَّهِ، عَنْ إِسْرَائِيلَ، عَنْ مَنْصُورٍ، عَنْ إِبْرَاهِيمَ، عَنْ عَلْقَمَةَ، عَنْ عَبْدِ اللَّهِ، قَالَ دَخَلَ عَلَيْهِ الأَشْعَثُ وَهْوَ يَطْعَمُ فَقَالَ الْيَوْمُ عَاشُورَاءُ‏.‏ فَقَالَكَانَ يُصَامُ قَبْلَ أَنْ يَنْزِلَ رَمَضَانُ، فَلَمَّا نَزَلَ رَمَضَانُ تُرِكَ، فَادْنُ فَكُلْ‏.‏
Translation
Narrated `Abdullah

That Al-Ash'ath entered upon him while he was eating. Al-Ash'ath said, "Today is 'Ashura." I said (to him), "Fasting had been observed (on such a day) before (the order of compulsory fasting in) Ramadan was revealed. But when (the order of fasting in) Ramadan was revealed, fasting (on 'Ashura') was given up, so come and eat."