The Sunset Calculator

    Welcome to the sunset calculator. This manual will help you understand how to calculate the sundown and sunrise times for your location, and help explain how the results are obtained.

    • What is a sunset calculator?
    • Definitions
      • What is sunrise and sunset?
      • What is the Equator?
      • What is the Greenwich Meridian?
      • What is latitude?
      • What is longitude?
      • What is a time zone?
    • How do I find my coordinates?
    • How do I find my time zone?
    • What do the results mean?
    • How accurate are the results?

    What is a sunset calculator?

    A sunset calculator is a program which takes in certain specifics about one's location on the earth's surface, one's time zone, and the date for which the calculation is to take place, and using a formula, calculates the times of sunrise and sunset for that specific location, on that specified date.

    Definitions

    If one is to get accurate results, and know how to operate this calculator, one must first understand some of the terminology used:

      Sunrise and sunset:

        During the course of a day the Earth rotates once on its axis causing the phenomena of rising and setting. All celestial bodies seem to appear in the sky at the horizon to the East of any particular place, then to cross the sky and again disappear at the horizon to the West. Because the Sun appears as a circular disk and not as a point of light, a definition of rise or set must be very specific, for not all of it's body is seen to rise or set at once.

        Sunrise and sunset conventionally refer to the times when the upper edge of the disk of the Sun is on the horizon.


      Equator:

        The Equator is a geometric line that runs from East to West across the center of the earth, exactly half way inbetween the two axis' poles (North pole +90°, Southpole -90°), and is labled as 0° longitude.

      Greenwich Meridian:

        Meridian comes from a word meaning "Middle". The Greenwich Meridian was set at the Greenwich observatory, in Greenwich, England to be the geographic point for where East and West meet. Therefore, Greenwich Meridian is indicated as 0 ° latitude. The world time standard is set at Greenwich observatory, and all other time offsets (in terms of time zones) are calculated from Greenwich Mean time (GMT), or Universal Time (UT), as it is often called .

      What is latitude?

        The latitude is a scale used to measure one's location on the earth's surface, North or South of the Equator. Latitude is measured between -90.0° South, and +90.0° North, of the Equator point (0°). Latitude values for points South of the Equator are always negative, and values for points North of the Equator are always positive.

      What is longitude?

        The Longitude is a scale used to measure one's location on the earth's surface, East or West of the Greenwich Meridian. The Meridian is 0° longitude. Longitude values for points East of the Meridian are always positive, while points West of the Meridian are always negative. A combination of latitude and longitude degrees can provide one with one's exact location on the earth's surface.

      What is a time zone?

        There are 24 standard Time zones, each approximately occurring at 15° intervals of latitude. One must offset the Universal time (UT, or GMT) by the number of hours West, or East of the Greenwich Meridian. Going West, one must subtract the number of hours from GMT. Going East, one my add hours to GMT. This was done so that every section of the world would be able to operate on a standard 24 hour day.

    How do I find my coordinates?

    We have provided you with two methods of finding your coordinates.

    1. Click through a series of maps to obtain a rough estimation of your coordinates.
    2. Click through a database of Countries and Cities, to obtain coordinates for your chosen city.

    Option 1:

      When you choose a continent from the blue bar on the bottom of your screen:


      You will be given a map of that continent. At the top of the map, you will see circles labeled "N", "E", "S", "W", that indicate the span of the map in each direction. Each coordinate listed signifies the maximum coordinates that the map spans. You can c hoose another continent at any time by clicking on the blue bar again.


      You can click on any portion of the map. When you click, the calculator will reload and the two boxes on the right hand labeled "Latitude" and "Longitude" will be filled with the approximate latitude and longitude values which you selected by clicking. If you are not happy with your selection, you can click again on the map, until you are satisfied that you have made a good selection (Please see section about the accuracy of this method). Each time you click, the calculator will reload with new values for latitude and longitude.

      You are given the option to fine tune your selection by clicking on the "Fine tune" button


      This button will take you to the Xerox PARC Map Server where you can click on the maps provided. Every time you click, the map will zoom in and center on your selection. The coordinates for your selection will be listed in degrees West or East, and Degrees North or South. Remember that degrees West and South are negative, so you must convert them manually before you continue with the calculation. After you are happy that you have gotten the correct selection, you can go back to the calculator and enter the numbers manually into the Latitude and Longitude box es.

      When you select a continent, the calculator will automatically list all time zones for that continent in the box labeled "Please Select Time Zone". You can then select the time zone for your location from that list. Keep in mind that some selections adher e to Daylight savings time (DST). You will need to know if the date you are calculating for has DST added to it.


      Once you are satisfied that you have the right coordinates, and the right time zone selected, you can now go on to specifying what type of information you want displayed. We give you four options:

      • Show sunrise (selected by default)
      • Show sunset (select by default)
      • Give tonight's time
      • Give next Fri/Sat times
      • Give times for specified date
      • Give times for current year

      Show sunrise, Show sunset:

        You can choose whether you want the sunrise displayed or if you are just interested in the sunset times. If you want to disable one of them, you can simply click on the little square box next to "Sunrise" or "Sunset".

        Check box:

      Give tonight's time:

        The program will calculate sunset/sunrise times for the current date if you choose to select this option. This option is the default one, but you can select it manually by clicking on the radio box next to "Show tonight's time".

        Radio box:

      Give next Fri/Sat times:

        This option will make the program calculate the nearest Friday and Saturday from the current date, and perform the calculation for that date.

      Give times for specified date:

        You can manually choose the month, day, and year with this option by choosing the month from the select box, and typing in the day and year in the boxes next to the month box. The year must be in four (4) digit format, example: 1998. Remember th at you also have to click the radio box next to the date that you entered, otherwise the program will assume today's date.

      Give times for current year:

        If you select this option, the program will print out a calendar for each month, starting in January, and calculate the sunrise/sunset for every day of the current year. The Calendar will highlight Fridays and Saturdays, and will also highlight the current day in the year.

      Once you have selected your options, made sure that you have chosen the coordinates and time zone to your satisfaction, and that you have selected the correct display option, you can click on the Calculate button.

    Option 2:

    This option is often preferred by people. Using this option, you can simply choose a country, and click continue to get a list of cities for that country.


    The calculator will reload and show you a list of cities for that country for which is has available data. In the case of the United States and Canada, you will have to select a State or Province first before a list of cities is displayed. Every time you click continue, a new screen will come up with new data available.


    Once you have chosen the specific city for which you want sunset times calculated, the first calculator screen will appear again, with the "Latitude", and "Longitude" boxes filled in with the coordinates for that city. You will need to repeat the steps li sted in option 1, for choosing the time zone, and display options.

    How do I find my time zone?

    Since the rules for time zones, and Daylight savings time are rather complicated, we cannot provide you with an easy method to find the time zone for your chosen area. There are time zone maps available on the Internet that may provide you with data for a ltering the results yourself. One such map can be located at U.S. Naval Observatory. Our program will guess time zones based on your latitude, and will find the nearest time zone(s) avail able for that latitude range (As stated above, time zones occur approximate every 15° lattitude). Most of the time, the selection the program makes will be correct, however, it is worth checking before you proceed with clicking "Calculate". The program wi ll assume Standard Time, and will not take Daylight Savings or Summer Time into consideration unless you specify it to do so.

    If you are not sure of the name of your time zone, and wish to manually change the result, select Universal time, or Greenwich Mean Time from the time zone list, and motify the output by subtracting or adding the number of hours for your time zone, from t he given time.

    What do the results mean?

    Once you have pressed "Calculate", the program will produce a table listing the sunset time and sunrise time for the specific date that you chose. It will give a time in standard 12 hour notation, appending an 'am' or 'pm' to the hour:minutes value, depen ding on whether the result was before midday or after. Some dates, for some coordinates may generate "Up" or "Down" results, which means that the sun will the up the whole day and never set, or down all day, and never rise. Phenomena such as these often o ccur at areas close the North and South poles.

    How accurate are the results?

    If you are using the maps to choose your location, be warned that due to the earth's curviture, the further north, or south you click, the more erroneous your selection may be. In these cases, you may need to fine tune your results as mentioned before. In most cases, it is easier just to select the closest city to your location.

    The results that are displayed are rounded to the nearest 2nd decimal place e.g., 8:344 will round to 8:34, and 8:345 will round to 8:35.

    The times of rise and set phenomena cannot be precisely computed, because, in practice, the actual times depend on unpredictable atmospheric conditions that affect the amount of refraction at the horizon. Thus, even under ideal conditions (e.g., a clear s ky at sea) the times computed for rise or set may be in error by a minute or more. Local topography (e.g., mountains on the horizon) and the height of the observer can affect the times of rise or set even more. It is not practical to attempt to include such effects in routine rise/set computations.

    The accuracy of rise and set computations decreases at high latitudes. There, small variations in atmospheric refraction can change the time of rise or set by many minutes, since the Sun intersects the horizon at a very shallow angle. For the same reason, at high latitudes, the effects of observer height and local topography are magnified and can substantially change the times of the phenomena actually observed, or even whether the phenomena are observed to occur at all.



    Disclaimer: Calculation of sunset and sunrise times are dependant on your exact latitude, and longitude coordinates. The continental maps do not provide accurate positioning. For more accurate results, manually enter latitude and longitude (Coordiantes south of equator, and west of Greenwich Meridian, must be negative), which can be obtained from Xerox PARC Map Server.

    This Sunset Calculator is Copyright © 1998 by Adventist.org, written by Michael Dabrowski, from original implementation by Paul Schlyter, © ' 89, ' 92. City database compiled from data gathered by Xinhang Shen and Todd Westphal. The C source code from which this calculator was first created can be obtained, and is given with no warranty or guarentee. The perl library sun.pm was created for this calculation from the C original, and can be obtained also with no warranty of guarentee.