Copyright: Sunny 2000 (C) 1993 by L.A.M.


Sunny 2000
Sunny 2000	Version 4.01

by

Lou A. Moccia

Copyright © 1993 by L.A.M.

Sunny 2000 calculates the times of sunrise and sunset for any location in most of the North American continent, for any date from the year 100 to 9999.  The times of the dawn and dusk astronomical, nautical, and civil twilights are calculated as well.  Sunny 2000 can graphically display the phase of the moon for any date, and there is a monthly calendar display for viewing and selecting dates easily.  Daylight Saving Time (and even its history) is taken into account automatically, and can be disabled for areas that are exempt from it.

Main Window

Menus

Daylight Saving Time

Version History

Programmer's Plea


Main Window

The Date will accept the range of years from 100 to 9999, but the accurate range for the phenomena times is generally from 1951 to 2000 (hence the name Sunny 2000).  The moon phase, which is based solely on the date, is accurate to about ±1 day for the entire range of years.  For certain dates in history, a special note about Daylight Saving Time will appear.

The Location consists of the latitude and longitude, which can be entered in full degrees, minutes, and seconds (for example, 110.5024 would mean 110 degrees, 50 minutes, and 24 seconds).  Accepted latitudes are from 18 to 72 degrees North, and accepted longitudes are from 65 to 170 degrees West.  This is a good part of the North American continent.  For accurate latitudes and longitudes, and therefore accurate Results for your area, consult a road atlas or encyclopedia atlas that has coordinates along the map borders.

The list box in the Location area contains pre-defined cities from which to choose.  When you select one of the cities, the latitude, longitude, time zone, and Daylight Saving Time menu choice are disabled, because this information is pre-defined for each city.  A dash (-) at the beginning of a city name designates it as a U.S. state capital.

To enter your own information, select the "<Other>" choice at the top of the list.  The latitude, longitude, time zone, and Daylight Saving Time used for <Other> will be remembered between city selections.  If either of the latitude or longitude input fields is empty, then the value from the last selected city will be placed in the empty field when you select <Other> again, and the time zone and Daylight Saving Time setting will also be set to that city.  This allows you to grab the info from a pre-defined city to make adjustments or experiment.

The coordinates used for the cities are at best approximate, and are intended primarily as a general guide.  The coordinates are from the Nelson Philip American Compact Atlas (1978).

It is important that the Time Zone be selected correctly for the Location, or the Results will be invalid.

Brief descriptions of the phenomena times calculated in the Results:

Astronomical Dawn Twilight:	Faint stars are no longer visible.

Nautical Dawn Twilight:	Brighter stars are no longer visible.

Civil Dawn Twilight:	The sun is just below the horizon (AM).

Sunrise:	The sun is just above the horizon (AM).

Sunset:	The sun is just above the horizon (PM).

Civil Dusk Twilight:	The sun is just below the horizon (PM).

Nautical Dusk Twilight:	Brighter stars become visible.

Astronomical Dusk Twilight:	Faint stars become visible.

If "No Event" is shown for a phenomenon, it means that it is too brief or doesn't occur at all.  This is seen more as the latitude increases, especially at the northernmost latitudes where there are alternating extended periods of light and dark.  As a general rule, "No Event" shown for all phenomena means the location is in an extended period of light, and "No Event" shown for only sunrise and sunset means the location is in an extended period of dark.

If "Invalid" is shown for a phenomenon, it means that it couldn't be properly computed.  This is most likely due to incorrect input (but not always).  For example, "Invalid" is usually shown when the wrong time zone is selected for a location far from it way up north.

The Length of Day is the amount of time from sunrise to sunset.  If a different message is reported, then it usually means the same as "No Event" or "Invalid" described above.

The number of hours since midnight (elapsed in the 24-hour period) and the number of hours until the next midnight (remaining in the 24-hour period) are displayed with the current time.

The buttons in the main window correspond to the same choices in the Menus.

A note about the Windows display:  Sunny 2000 was designed and tested using the standard Windows 3.1 "VGA" and "Super VGA (800x600, 16 colors)" display drivers, and the Microsoft "Super VGA  800x600 256 Small" display driver.  Testing was also done using other high-resolution drivers from Tseng and Diamond that use "small fonts."  Some window items may shrink and misalign a bit, and other display anomalies may occur, on displays of other sizes and from other sources.  I have noticed that some 800x600 drivers "blow up" an application's windows and make it look like it's on a 640x480 display, which I guess the purpose of is to make it easier to see.  These drivers usually say "large fonts" or just "large" in their name descriptions.  Though such drivers may make easier reading, they tend to make some parts of an application look strange because some window items don't blow up to match the blown up window size and fonts.  I have also heard that using WinSpeed drivers affect the size and alignment of certain fonts with certain video cards.  This is not the fault of the programming code in the application, but is due to the particular display driver used.  Even though Windows is designed for device-independent use of the display, unfortunately not everything can look the same on every display with various video cards and display drivers out there.


Menus

Compute:

The following menu choices have corresponding buttons in the main window.

The Results choice will calculate the phenomena times and Length of Day based on the Date, Location, and Time Zone.

The Moon choice will display the Moon Phase window, which graphically shows the moon phase based on the Date.  The Moon Phase window can be left open and moved anywhere on the screen, which allows you to use the Moon choice to quickly update the moon for different dates.

The Both choice will perform the Results and Moon choices together.

Input:

The following menu choices have corresponding buttons in the main window.

The Today choice will restore the Date to today's date after any changes are made.

The Load choice will restore the saved settings after any changes are made (see the Save choice below).

The Both choice will perform the Today and Load choices together.

The Calendar choice will display the Calendar window, which shows the monthly calendar for any date.  When the Calendar window is open, the Calendar choice and button in the Date area will update the calendar to the entered Date.

To update the Date using the Calendar window, use the Month and Year scroll bars to select the month and year, and double-click on the day (or use the Date button).  The Today button will restore the calendar to today's date after any changes are made.  The Calendar window can be left open and moved anywhere on the screen.

Settings:

The Startup Moon choice, when checked, will cause the Moon Phase window to be displayed at startup.  Selecting this choice will update its setting in the file named SUNNY.INI.

The Startup Calendar choice works same as above, but for the Calendar window.

The Daylight Saving Time choice toggles the automatic calculation of Daylight Saving Time on and off for the <Other> location.  When checked, the automatic calculation of Daylight Saving Time is activated.  When not checked, Daylight Saving Time is not used.  This is provided for areas that are exempt from Daylight Saving Time.  The Daylight Saving Time choice has no effect on certain dates in the past when Daylight Saving Time was observed nationally or not implemented yet.

The Auto Date Results choice, when checked, causes the Results to be automatically calculated as the Date or city is changed.  When not checked, you must select the Results choice to calculate the phenomena times after changing the Date or selecting a new city.

The Auto Moon Results choice, when checked, causes the Moon Phase window to be automatically updated as the Date is changed.  When not checked, you must select the Moon choice to calculate the moon phase after changing the Date.

The Tile Windows choice toggles between Tile Windows Center and Tile Windows Left.  It affects how the Tile choices of the Window menus work (see the Tile Both choice below).

The Save choice will save the current settings of the Settings menu, Location, <Other> entry, and Time Zone to a file named SUNNY.INI in the Windows directory.  These settings will be used at startup to immediately compute today's Results.

Window:

The Front choices will bring the selected window to the front of all other windows.

The Center choices will bring the selected window to the front, and center it on the screen.

The Tile Both choices will bring the main window and the selected other window to the front, and vertically center them next to each other.  The horizontal placement of the tiled windows is affected by the Tile Windows choice of the Settings menu.  When Tile Windows Center is shown, they will be centered on the screen.  When Tile Windows Left is shown, they will be moved to the left edge of the screen.

The main window Tile All choice works like the Tile Both choices, but moves both other windows.  The Calendar window will be lined up with the top edge of the main window, and the Moon Phase window will be lined up with the bottom edge.


Daylight Saving Time

Sunny 2000 performs automatic calculation of Daylight Saving Time while taking its history into account.  For certain dates in the past, a special note about Daylight Saving Time will appear in the main window Date area based on the information below.

1784:

Ben Franklin suggested Daylight Saving Time in a whimsical essay.

3--31--1918  to  10--27--1918  and

3--30--1919  to  8--19--1919:

Daylight Saving Time was observed nationally.

8--20--1919:

Daylight Saving Time was repealed due to opposition from farmers.

2--6--1942  to  9--30--1945:

"War Time" Daylight Saving Time was observed nationally.

1946  to  1966:

Daylight Saving Time was in effect from (2am?) the last Sunday of April to (2am?) the last Sunday of September.  (2am is assumed in Sunny 2000.)

1967:

The Uniform Time Act was passed in 1967 to extend Daylight Saving Time from 2am on the first Sunday of April to 2am on the last Sunday of October.

1--6--1974  to  10--26--1974  and

2--24--1975  to  10--26--1975:

Daylight Saving Time was observed nationally to conserve energy.

1976  to  1986:

Daylight Saving Time was in effect from 2am on the last Sunday of April to 2am on the last Sunday of October.

7--8--1986:

President Ronald Reagan signed legislature to extend Daylight Saving Time for 1987 on.

1987  to  Present:

Daylight Saving Time is in effect from 2am on the first Sunday of April to 2am on the last Sunday of October.

Any state can, by law, exempt itself from Daylight Saving Time.  A 1972 amendment to the Uniform Time Act authorized states split by time zones to take that into consideration in exempting themselves.  Arizona, Hawaii, Puerto Rico, the Virgin Islands, American Samoa, and part of Indiana are currently exempt.  Some local zone boundaries in Alaska, Florida, Kansas, Michigan, and Texas have been modified in the last several years by the Department of Transportation, which oversees the Uniform Time Act.

The above information was taken from an old Encyclopedia Britannica, and from the World Almanac and Book of Facts 1992.


Version History

4.01  --  Fixed minor problem with the Moon choice, and made minor corrections and additions in the help file.

4.00  --  Added a list box of pre-defined locations for 94 cities throughout North America!  Changed the time zone selection to a list box.  Added the Auto Date Results and Auto Moon Results settings.  Added the option to display the Calendar window at startup.  Completely rewrote the Length of Day code making it more reliable, and fixed an obscure bug.  Improved the accuracy of the moon phase a bit.  Further improved the input field checking and editing, and the contents are now highlighted when a field gets the focus.  The year range is now 100 to 9999, which is the new limit of the programming environment.  Standard time zone abbreviations (EST, EDT, etc.) are now used in the Results.  Made other minor changes, expanded the help text, and Sunny 2000 has now hopped on the popular 3-D wagon with its new look.

3.20  --  The Moon Phase and Calendar windows can now be minimized.  The Details text was moved to this Windows Help file, and the Help menu was changed to call up Windows Help.  Minor adjustments were made to the About window to compensate for the new way Windows 3.1 handles text wrapping.  All font names were changed to the new Windows 3.1 font names.  The documentation text files were incorporated into this Windows Help file, and the README.TXT text file now just describes how to set up the application.  Made other minor cosmetic changes.

3.11  --  Fixed problem running the program on the date 2/29 (the date 2/28 would be incorrectly used).  Good thing a leap year came around!  Also corrected some Details text.

3.10  --  Added support for Alaska and Hawaii, and a good part of the North American continent in the process.  Reprogrammed the way the moon is drawn, hopefully improving it for most displays higher than 640x480 (and therefore added "A note about the display" to the Details).  Added a choice to the Settings menu that affects how the Tile choices of the Window menus work.  Changed the way the D.S.T. choice of the Settings menu works.  Modified the main window, Moon Phase window, and Details text.  Fixed problem using Close of the main window system menu.

3.00  --  Added the Calendar window.  Added a button to the Date area of the main window for updating the Calendar window.  Modified the Moon Phase window and increased the size of the displayed moon.  The state of the moon is now reported (new, first quarter, full, last quarter).  Added the Input menu to the main window, which separates the appropriate choices from the Settings menu.  Added to the Window menu in the main window.  Once again, improved the input checking of the Date and Location fields.  You are now alerted if the Location contains an invalid value when you save the settings, and the value in the SUNNY.INI file will not be overwritten in such a case.  Added to the Details window text.  Made other minor improvements and changes throughout.

2.10  --  The Moon Phase window can now remain open while using the main window, and the moon is now updated smoothly instead of by redrawing (both makes it easier to compare moon phases between dates).  Added the Window menu to both the main and Moon Phase windows; the Window menus have choices to bring the other window to the front, center the window on the screen, and tile both of the windows to the left edge of the screen.  Added the option to display the Moon Phase window at startup.  The automatic calculation of Daylight Saving Time now takes its history into account.  Decreased the lowest year accepted to the minimum of 1753; the year range is now 1753 to 2078, which is the largest allowed by the programming environment.  Improved the input checking of the Date and Location fields.  The input used for computing the results is now displayed in the Results area, to help avoid confusion when the input has changed but not yet computed.  Added menu and button choices to the main window to perform both the Results and Moon choices together, and both the Today and Load choices together.  Added 'remaining hours until the next midnight' to the 'elapsed hours since midnight' display, next to the current time display.  The Esc key can now be used to close each window.  Modified the main window and its menus.  Changed the menu shortcut keys.  Expanded the Details window text.  Made other minor changes throughout.

2.00  --  Added the graphical Moon Phase window.  Modified and rearranged the main window for the better.  Added scroll bars to the Date fields for keyboard-free input.  Added elapsed hours since midnight to the current time display.  Modified the Details window and expanded the text.

1.30  --  Added the option to disable the automatic calculation of Daylight Saving Time for those areas that are exempt from it (like Arizona, for example).  Removed the Save button from the main window (avoids accidental overwriting of the saved settings).  Slightly modified the other buttons.  Added to the Details window text.  Added a special message in the About window (please click the sun).  Increased the highest year accepted to the maximum of 2078.

1.23  --  Oops, again had to clean up the About window text for users without Adobe Type Manager or other similar font software.

1.22  --  Slightly enhanced the main window.  The color of all the windows is now the same.

1.21  --  Somewhat improved the input checking of the date fields.  Fixed the use of Tab in the main window.  Corrected a minor error in the Details window text.

1.20  --  Added "sunrise to noon" and "noon to sunset" to the results.  Cleaned up the About window text for users without Adobe Type Manager or other similar font software.  Modified the main window.

1.10  --  Added "length of day" to the results.  Changed the main window.

1.00  --  Initial release.  (Had to start somewhere!  hehe)


Programmer's Plea

Sunny 2000 is that nutty brand of software called Shareware.  If you keep it and use it, then please make me feel better by sending just $8.00 to the address below.  Thank you!

Lou A. Moccia

109 Apple Lane

Mt. Laurel, NJ 08054

Any questions or comments are welcome.  You can send e-mail to:

America Online:	PCA Lou

Internet:	pcalou@aol.com

Thank you very much for trying Sunny 2000!

P.S. -- Please click on the sun in the About window.  :)