Return to the home page.

The Ultimate Windows Math Toolbox

 

bullet Ver 3.0.697
23 June 2008
bullet Free support
bullet Only $44.85 (US)
(Professional)
Click to buy UltimaCalc Professional
bullet Only $34.85 (US)
(Standard)
Click to buy UltimaCalc Standard.

bullet Free download

<<< Prev  Next >>>

 

Time and Date

Dates can be entered from 1/1/-4712 (1 January 4713BC), the start of the Julian period, to beyond the foreseeable future. However, be warned that the history of calendars is long, complex, and confused. Although the old Julian calendar was used from about 46BC onwards, it was changed many times and did not settle down until after 4AD.

In 1752, the UK, USA and Canada changed from the old Julian calendar to the modern-day Gregorian calendar. The day Wednesday 2 September 1752 was the last day of the Julian calendar; the next day was Thursday 14 September 1752. Catholic countries had already changed their calendar back in 1582, the day after 4 October 1582 becoming 15 October 1582. UltimaCalc takes the change of calendar into account, and you can select which of these two dates to use.

To view values as dates, select the item “Date and Time" in the “View” menu; otherwise values are shown as numbers (hours). Date values between -10000 to 10000 are treated as a pure time, with no associated date. Enter date/time values for example in the formats #dd/mm/yy hh:mm:ss# or #hh:mm:ss dd/mm/yy# or #dd/mm/yy# or #hh:mm:ss#, or enter times in hours (and see below). You can select the ordering of the day, month and year, and other features, by selecting the menu item Options / Other and selecting the Date Format tab.

Today and Now

The variable today returns the current date, and the variable now returns the current time. Thus today + now returns the current date and time.

Easter

The function easter(year) returns the date of Easter for the specified year, which should be after 1582, as the method of calculating the date of Easter was changed in this year, when the Gregorian calendar was created. The date returned by easter is adjusted so that it is displayed as a (proleptic) Gregorian date. This is done by adding 10 days for the years 1700 to 1752, and adding 11 days if the year is 1582 to 1699.

Suffixes

For convenience, there are suffixes which apply a multiplier to the value immediately preceding. These are particularly useful in engineering mode, and when dealing with dates and times. Times are stored in multiples of 1 hour. This allows the following:

  • 1wk or 1wks or 1week or 1weeks ..... multiply the value by 168 (the number of hours in a week)
  • 1d or 1day or 1days ..... multiply the value by 24
  • 1h or 1hr or 1hrs or 1deg ..... leave the value unchanged (a time, or an angle in degrees)
  • 1m or 1min or 1mins ..... divide the value by 60
  • 1s or 1sec ..... divide the value by 3600

So 1hr+30min evaluates to 1.5 and today + 2 weeks gives the date two weeks ahead.

The format used for time also allows entry of angles in degrees, minutes and seconds. This can also be done by using the forms hh:mm or hh:mm:ss. For example, 5:30 and 5:30:00 both evaluate to 5.5 (hours or degrees).

Calculations

With dates, you can add or subtract a time interval. The suffixes given above are very useful for this. For example, today + 1day gives tomorrow's date.

One date can be subtracted from another. If the view mode is set to “Time and date”, the result (if less than 10000 hours) will be shown as a time in hours, minutes and seconds. A result greater than this will be shown as a spurious date, but if the view mode is not Tme and Date, the result will be shown as the number of hours difference between the two dates.

Julian Day Number

To calculate the Julian Day Number for a given date and time, subtract 10012 from the date and divide the result by 24. Note that, for the benefit of astronomers, Julian day numbers change at mid-day, rather than at midnight. For convenience, you can define a function as julian(x) = (x-10012)/24 to easily calculate the Julian day number of a given date.