The Time2Time app calculates the difference between two Events, two points in time between January 1, 1700 and December 31, 2199. The earlier Event is set in the Start Date & Time Panel and the later Event is set in the End Date & Time Panel. Once both Events have been set, the Calculate button in the Button Panel is active; clicking it presents the time difference calculation in the Results Panel.
Initial Start/End input panels
When
Time2Time initializes, you see two panels at the top of the app, one for the Start Event Date & Time, the other for the End Event Date & Time. You can enter Event Date/Time in any of three ways:
- Manual Entry Mode - select month, day, year, and (optionally) hour, minute, second. Set the Daylight Savings Time flag (DST) if it applies, and choose the appropriate time zone
- Current Time Mode - auto-select the current local time, as recorded by your computer's internal clock
- Select Event Mode - choose from one of the pre-defined or user-defined Events in the Event List (the date/time, location, time zone, and other information about the Event has already been set).
Choose the appropriate radio button in both the Start and End Date and Time panels, then click the Go button to activate the appropriate screen. If you wish to return to either Selection choice panel, click the small blue button in the right corner of the Start or End Date/Time header field.
MANUAL ENTRY: Enter a Start Date/Time or End Date/Time by selecting the appropriate Month, Day, and Year values. You can enter a Start or End Year, in the range 1700 - 2200, or click the small Year Selector button adjacent to the Year field and choose your desired Year value. Clicking the Year Selector button a second time removes the Selector field. The Hour, Minute, and Second fields are optional; if not specified, they are set to zero (local midnight). The Time Zone field defaults to your local time zone, but may be set to Greenwich Mean Time (GMT) or any of 37 Internationally recognized zones (see the TIME ZONES section below for details).
In Manual Entry mode, all fields are selectable
In Manual mode you can enter the year directly into the year field, or select it from a choice list by clicking the small Calendar button with the blue border. The Year Selector window opens.
Click the Year Selector icon to select it
Navigate using the right arrows in each column to reach the desired year, then click. The selected year is displayed. Click the Calendar icon a second time to deselect the Year Selector.
Clicking any year in the Year Selector
CURRENT TIME: The Current Date and Time to the nearest second is automatically entered into all appropriate fields. The Daylight Saving Time (DST) checkbox is automatically checked if in effect. All date and time fields are locked.
In Current Time mode, the exact local time is set
HISTORICAL EVENT: Allows you to choose an Event (pre-defined or user-defined) from a selection list; all Date/Time values associated with the Event are automatically populated. The Daylight Saving Time (DST) checkbox is automatically checked if in effect. All date and time fields are locked.
In Select Event Mode, the Event selection list is available
Once both a Start and End selection has been made, the Calculate button and Reset buttons are active. Click Calculate to perform the calculation. Click Reset to clear all fields and start over.
Example: Start D/T Manual input, set to the beginning of year; End D/T set to Current D/T.
Example: Time Difference between two historical Events
The
Time2Time app has the capability of creating, storing and retrieving Events. These user-defined Events are treated exactly like the set of pre-defined Events: once created, they can be selected from the Event selection list and used in time difference calculations.
There are a few important caveats that you need to consider when creating Events:
- A user-defined Event can be accessed from one browser session to the next, but only if you use the same browser. For example, if you create your event using Microsoft Edge, it will only be accessible in Microsoft Edge sessions. It will not be accessible from Chrome, Firefox, or other browsers. This is a constraint enforced by current browser technology. Each browser maintains its own local storage which is not available to other browsers.
- A user-defined Event can only be created if the browser has permission to do so. Most browsers have privacy settings, and certain settings disable the ability to save browser data to local storage.
- Likewise, certain browser cleanup actions such as clearing your history may automatically delete all locally stored data.
ADDING AN EVENT: You can add an Event to the Event List by entering the Event Date and Time fields in Manual Entry mode (either Start or End Time), then clicking the Add checkbox in the input form.
Example: Adding a User-Defined Event
The
Manage Events button (second from right on the button panel) is activated. Click this button to activate the Add Event form. Enter an Event name and Event location, as shown in the example:
Example: Input form for Add User-Defined Event
Click the Submit button to add the new Event to the Event list.
Example: Result for Add User-Defined Event
The new Event is immediately accessible in the Event Selection list; its location in the list is based on event date order.
DELETING AN EVENT: You can delete a User-Defined Event by selecting it in SELECT EVENT mode, then click the DEL checkbox on the input form. The Manage Events button (second from right on the button panel) is activated. Click this button to bring up the DELETE EVENT form:
Select User Event to delete
Click the Submit button to delete the Event from local storage and the Event list.
Example: Result for Delete User-Defined Event
The number of user-defined Events you can store on your computer will depend on several factors, including browser storage constraints, and use of local storage by other applications.
In principle, time zones govern local time as offset from Coordinated Universal Time (UTC), also referred to as Greenwich Meridian (Mean) Time. Each zone is nominally a 15 degree offset in longitude east or west from the prime meridian (0 degrees longitude) that runs through the town of Greenwich, England, outside of London. In actuality, the situation is much more complicated, driven by many factors, including the fact that some countries that cross more than one zone typically use a single local time reference. The international date line (IDL) also does not always follow the 180 degree line-of-longitude; it zig-zags to cover or avoid various Pacific Island chains, for example. Furthermore, fractional hour offsets govern certain locales (for example, the country of Afghanistan employs a 30 minute offset instead of a one-hour offset, UTC+04:30). In manual entry mode, Time2Time recognizes and allows you to select any of the 37 internationally-recognized time zones using the Time Zone selection box. Hover the cursor over each option to view alternate names for the zone, including its Military designator (if there is one), as well as major locales (cities, etc.) in which the zone is applicable.
Selecting a timezone and viewing details
Technical Details (web sites containing authoritative information on time zones)
Time2Time uses the local clock to determine whether Daylight Savings Time is in effect at app initialization, and when the Current Time option is selected. Considerations are:
- Does the local time zone use DST, and if so, is it in effect for a specified local date/time?
- What hemisphere is local time applicable to? (Northern hemisphere uses DST in "summer" months, Southern hemisphere uses DST in "winter").
Time2Time gets the Time Zone offset for January and July, and makes the following assumptions:
- If the January and July Time Zone offsets are equal, the local time zone does not adhere to DST.
- If the January Time Zone offset is less than the July Time Zone offset, DST is applicable; we're in the Northern Hemisphere.
- If the January Time Zone offset is greater than the July Time Zone offset, DST is applicable; we're in the Southern Hemisphere.
In Manual Entry mode, Time2Time allows you to specify either the Start time, End time, or both, in terms of Daylight Savings Time, by selecting the DST checkbox in the input panels. However please note that the app does not independently assess or verify whether Daylight Savings time is actually applicable to that particular date or location; its only effect is to add one hour to the local time zone set in the Time Zone field. Be aware that over time, various countries, including the United States, of course, have enacted laws that alter the start and end of Daylight Savings Time. The FROM or TO fields in the Results box will display the correct UTC offset, and display the phrase "Daylight Time" if the DST checkbox is selected, and "Standard Time" if not. For example, Eastern Standard Time, which has an offset of five hours behind Greenwich Mean Time (UTC-5), will be specified as "UTC-4 (Eastern Daylight Time)" in the Results panel, and the time difference will be adjusted by one hour. Of course, selecting the DST box for both Start and End time will cancel out the overall DST effect in the difference calculation.
Note: there are a few isolated anomolous locations (e.g., Lord Howe Island, off the coast of New South Wales, Australia), where the Daylight Savings Time adjustment is only 30 minutes forward, rather than 60 minutes. These location conditions are not factored into the app at this point.
Periodic minor adjustments to the global clock are required to align the clock with subtle changes in the earth's rotation. These primarily take the form of adding or subtracting one second (a "leap second") from the global clock at midnight local time. When adding a leap second, a clock reading of 23:59:59 is followed by a clock reading of 23:59:60, rather than the standard 00:00:00. As of this initial release, Time2Time does not account for leap seconds.
All countries follow the
Gregorian Calendar, which was established during the tenure of Pope Gregory XIII in 1582. By the late 16th century, the official Julian Calendar has accumulated an eleven-day difference with respect to the dates of the spring and fall equinoxes. Gregory's revised system amended the old Julian Calendar with a small change - century years that are not divisible by 400 are NOT leap years under the Gregorian system; for example, 1700, 1800 and 1900 are not leap years, but 2000 is, since 2000 is divisible by 400. This change brings the Gregorian calendar much closer in line to the actual solar year (365.2425 calendar days versus 365.2422 solar days). The official adoption date of October 5, 1582 simply became October 15, 1582; the intervening days were eradicated. Unfortunately, the Gregorian Calendar was not uniformly adopted by all countries in 1582; it took the better part of four centuries for the entire world to become fully compliant. This table from Wikipedia shows when the calendar was adopted by various countries:
Year | Countries/Areas |
1582 | Spain, Portugal, France, Poland, Italy, Catholic Low Countries, Luxemburg, and colonies |
1584 | Kingdom of Bohemia |
1610 | Prussia |
1648 | Alsace |
1682 | Strasbourg |
1700 | 'Germany', Swiss Cantons, Protestant Low Countries, Norway, Denmark |
1752 | Great Britain and colonies |
1753 | Sweden and Finland |
1873 | Japan |
1875 | Egypt |
1896 | Korea |
1912 | China, Albania |
1915 | Latvia, Lithuania |
1916 | Bulgaria |
1918 | Russia, Estonia |
1919 | Romania, Yugoslavia |
1923 | Greece |
1926 | Turkey |
2016 | Saudi Arabia |
Therefore, it is important to keep in mind, when using historical dates, which calendar system applies. You may need to subtract eleven days from an input date if the Julian system was in effect at the time. As of this initial release, Time2Time does not account for Julian Calendar dates.
Application Details: I wrote the Time2Time app as an exercise in web development; the basic idea occurred to me at some point when I tried to manually calculate my age. The app is written in basic HTML, Javascript, and CSS. I have relied on sources too numerous to mention for help in solving design and coding issues as I encountered them; I'm grateful for all those in the general development community who share their knowledge and provide code samples and design ideas.