The month of Ramadan in the Islamic Calendar, like all other months in this format, starts at the beginning of a new lunar cycle, on the new moon. As months are based on the lunar cycle and not on a consistent number system, this month can begin at any point of the year and can only be calculated relative to the months around it. Fasting lasts the entire month, and it goes from sunrise to sunset each day.
To calculate the time of Ramadan, a person must either find existing data on the Islamic calendar and use a lunar calendar to predict the dates, or use a website such as Islamicfinder.org, which keeps track of the official calendar electronically. Each month begins on the new moon of the lunar cycle, so Ramadan begins on the day following a crescent new moon and ends on the night of the next crescent new moon. Traditionally, it begins on the visual witnessing of the crescent new moon, but in case of bad weather making the moon phases difficult to see, Ramadan fasting ends after 30 days if it cannot be visually confirmed.
The time of day for fasting is decided visually. When the person who is fasting sees the sun rise, he should begin fasting, and when he sees the sun set, he should end fasting for the day.