Fasting: Ramadan by the Quran Alone
Fasting is one of the practices God decreed through Abraham, and the Quran keeps it as He gave it: one month a year, from dawn to sunset, with its reasons and its allowances spelled out in a handful of verses. Everything a Submitter needs to observe Ramadan is in them.
Decreed, and why
[2:183] O you who believe, fasting is decreed for you, as it was decreed for those before you, that you may attain salvation.
The purpose is stated in the same breath as the command: salvation, which is to say righteousness. Fasting is not a hardship imposed for its own sake; the verses that follow repeat that God "wishes for you convenience, not hardship" (2:185).
The month
[2:185] Ramadan is the month during which the Quran was revealed, providing guidance for the people, clear teachings, and the statute book. Those of you who witness this month shall fast therein. Those who are ill or traveling may substitute the same number of other days. GOD wishes for you convenience, not hardship, that you may fulfill your obligations, and to glorify GOD for guiding you, and to express your appreciation.
Ramadan is the ninth month of the lunar calendar, and it is honoured because the Quran came down in it. The month begins at the new moon: "They ask you about the phases of the moon! Say, 'They provide a timing device for the people'" (2:189). In this app, the Fasting tab works the dates out for years ahead from the astronomical new moon and your own sunset, since in the lunar calendar the night comes before the day and every day begins at sunset.
From dawn to sunset
[2:187] ... You may eat and drink until the white thread of light becomes distinguishable from the dark thread of night at dawn. Then, you shall fast until sunset. ...
The fast runs from dawn, when the first light can be told from the dark, to sunset. That is the whole of the rule: no food, no drink, and no sexual intercourse during those hours. Nothing more is asked, and nothing may be added. The same verse permits intercourse during the nights of Ramadan, and tells us that God knew the earlier, stricter rule was being broken and eased it: "He has redeemed you, and has pardoned you."
Who is excused
[2:184] Specific days (are designated for fasting); if one is ill or traveling, an equal number of other days may be substituted. Those who can fast, but with great difficulty, may substitute feeding one poor person for each day of breaking the fast. If one volunteers (more righteous works), it is better. But fasting is the best for you, if you only knew.
So there are two allowances. Whoever is ill or travelling fasts the same number of days later in the year. Whoever can fast only with great difficulty, the elderly for instance, feeds one poor person for each day instead, and is encouraged to give more. Pregnancy and nursing fall under the same mercy. No one is asked to harm themselves.
The Night of Destiny
[97:1] We revealed it in the Night of Destiny. [97:2] How awesome is the Night of Destiny! [97:3] The Night of Destiny is better than a thousand months. [97:4] The angels and the Spirit descend therein, by their Lord's leave, to carry out every command. [97:5] Peaceful it is until the advent of the dawn.
The Quran was placed into Muhammad's soul on the twenty-seventh night of Ramadan (see 17:1, 44:3 and 53:1-18). The last ten nights of the month are a time of retreat for those who can keep it: 2:187 mentions retreating to the masjid during them, and that intercourse is set aside for anyone who does. The Fasting tab marks the Last Ten Nights and the Night of Destiny for each year.
What is not in the Quran
Everything above is the whole of what God decreed. The rest, the formulas of intention to be recited, the special night prayers, the rules on toothbrushes and eye drops, the idea that a sip of water by mistake voids the day, the fasting of extra months, comes from sources other than the Quran and carries no authority. "These are GOD's laws; you shall not transgress them. GOD thus clarifies His revelations for the people, that they may attain salvation" (2:187). A Submitter fasts the month, from dawn to sunset, as the Quran says, and glorifies God for guiding them.
Fasting in the Quran, beyond Ramadan
Fasting also appears as an expiation elsewhere in the Quran: for breaking an oath (5:89), for a hunting violation during Hajj (5:95), in place of an animal sacrifice during Hajj for those who cannot afford one (2:196), and in the case of an unlawful divorce (58:4). These are specific remedies for specific acts, each stated in its own verse, and each on the same footing: the Quran alone.