FHSWDCLC - Date Calculator form for FHSWIN
This form is used to perform date calculations. It replaces the previous TSR program, DATECALC. It is accessed from the Main Menu from the "Calculator -- Date" entry in the drop down menu under "Utilities". Among the options that are available: you can determine the differences between dates, compute a date that is separated from a known date by a given difference, and display a calendar for any date. Both "Old" and "New" style calendars are supported (differing in the rules that are used to determine leap years).
At the top of the form, below the "Header", is an item for selecting the format for dates that are displayed. Clicking on the item opens a list of optional date formats, including: "MM-DD-YYYY:, "DD-MM-YYYY", "YYYY.MM.DD", "YYYY DDD", "MMM DD,YYYY" , "DD MMM YYYY" and "DDDDDDD", where the fourth and fifth formats use alphabetic abbreviations for the name of the month in the "MMM" portion of the date. The last format assigns a counting number to each day, with the date "01 JAN 0001" of the Julian calendar assigned the counting number of 1.
On the next line of the form, there are fields for entering two dates: DATE1 and DATE2. These fields initially contain the current date (displayed in the Date Format and following the rules for the style of calendar that were in effect the last time the Date Calculator was used). To the right of each date field is an abbreviation for the day of the week on which the date falls.
If you select a date field for update by clicking on it or tabbing to it, the first position of the date is "hilited". Pressing the space bar will move the hiliting to the next updatable character in the date. In positions where numbers are used to represent a part of the date, you can only enter numbers and where months are represented by an abbreviated name, you can only enter alpha characters that are part of a valid month "name". After entering a valid character, the "cursor" moves to the next updatable character. It will automatically skip over any formatting characters (such as "-", "." or ","). After you have completed entering a date (or both dates), press the Enter key (or click on the "Compute" button) and the program will calculate and display the difference between the dates in: whole years, months and days; whole years, weeks and days; whole years and days, and in total days.
NOTE: If you have entered an invalid date (for example 02-35-1999, in MM-DD-YYYY format) the date will not be flagged as an error, but it will be redisplayed as an "equivalent" valid date (for example 02-35-1999 would be changed to 03-07-1999. Similarly, 14-35-1999 would also be changed to 03-07-1999).
Below the date fields is the section where the date differences are displayed/entered. The first line begins with a symbol indicating the "sign" of the difference. It will be "-" if the second date is earlier than the first date, otherwise it will contain a "+". The remaining "date difference" fields represent components (years, months, weeks or days) of the difference between the two dates. These fields can also be used to enter values for the date difference and determine the appropriate value for DATE2 that would produce the entered difference with respect to DATE1. If the Enter key is pressed or the "Compute" button is clicked while the cursor is in one of the date difference fields, then the difference represented by the fields on the line containing the cursor (together with the sign field) will be used to determine the date. Clicking on the "Clear" button will set the sign to "+" and all of the date difference value fields to "0" in preparation for entering values for a date difference.
NOTE: computed dates cannot extend beyond the interval "01 JAN 0001" thru "31 DEC 9999" for the calendar that is being used.
The bottom line of the form has a field for displaying/selecting the calendar rules (from "Gregorian" and "Julian (OS)" or "Old Style". These rules differ in the way that leap years are determined. The "Old Style" rules specify that a leap year occurs every four years, including every "century" year. The "Gregorian" rules, which are used in most areas of the world today, specify that a "century" year is a leap year only if it is divisible by 400.) Changing calendar rules will change the displayed values for Date1 and Date2, and may change the values for some of the date differences.
The DATE1 and DATE2 buttons in the "Calendar" section of the form can be used to open up a display of the calendar for the chosen month. The buttons "<" and ">" to the left of the calendar heading can be used to move to the previous or next month respectively. The "<" and ">" buttons to the right of the calendar heading can be used to decrease or increase the year. Clicking on a day in the calendar will change the value for the DATE (on line 2) corresponding to the button that was used to open the calendar display. The date differences will also be recomputed. While the calendar display is open, changes made to the corresponding date field will cause the calendar display to change accordingly. The calendar can be "closed" by clicking on the "Hide" button.
The "Return" button on the right side of the first line can be used to close the Date Calculator. You can also close the form by clicking on the "X" in the upper right corner.