According to the Holy Quran, fasting is a religious practice common to the religions of the past. In the verses of the Holy Book, there are many references to fasting.
God says in Verse 183 of Surah Al-Baqarah: “Believers, fasting has been made mandatory for you as it was made mandatory for the people before you, so that you may have fear of God.”
This verse indicates that fasting is not just for the Muslim Ummah, but that it was a practice among followers of other prophets in the past. The followers of Prophet Yahya (AS) abstained from eating meat, eggs and some other foods. It is said in Suhuf Adam, the most sacred book of Mandaeans, that fasting is not just abstaining from eating and drinking but one should also keep eyes from satanic views, and ears from hearsay and lies, and tongue from telling lies and improper uttering words.
In Zoroastrianism too, there is fasting and they believe that on the second, twelfth, fourteenth, twentieth and twenty-first day of every month they should avoid eating meat. This fasting was meant to prevent eating too much meat.
Jewish people also fast. They fast on Yom Kippur, which is the holiest day in Judaism, as well as on six other days in the year. The aim of fasting in Judaism is to repent and pray to God and ask Him for favors.
Fasting also is common in Christianity, although it is different in various denominations. Some of them fast for a month and some even more. Of course their fasting is not on 30 consecutive days, like Muslims, but they fast in different periods and avoid eating meat, fish, dairy, and eggs.