NeoCal Documentation

NeoCal for Palm OS User Guide

Date Arithmetic

Date arithmetic involves the addition or subtraction of a moment with either a duration or another moment. The following combinations are supported:

  • A moment plus or minus a duration results in a similar moment.
  • A moment minus a similar moment results in a duration.
  • A date plus a time results in a datetime.

Date arithmetic involving dates and datetimes assume duration units to be days, while calculations involving times assume hours. Durations of other units are converted to these units, however, the duration conversion registers are not used. Instead, these conversions always use the default values of these registers. Explicit conversions to days and hours must be performed to use the values stored in these registers.

For example,

  1. Press and enter today's date (August 28, 2002).
  2. Press to calculate 90 days into the future (November 26, 2002).
  3. Press to calculate 90 days into the past (May 30, 2002).
  4. Press to recall today's date (August 28, 2002).
  5. Press to calculate 3 weeks into the future (September 18, 2002).

To calculate the day of year:

  1. Press to recall today's date (August 28, 2002).
  2. Press to calculate the number of days since December 31, 2001 (240).

To time an event:

  1. Press to generate the starting datetime (August 28, 2002 9:15 am).
  2. At the end of the event, press to recall the starting datetime.
  3. Press to generate the ending datetime (August 28, 2002 2:30 pm).
  4. Press to calculate the length of time (5.25 hours).

To construct a datetime value, add separate date and time values:

  1. Press to enter the date part (August 28, 2002).
  2. Press to enter the time part (3:15 pm).
  3. Press to combine the datetime value (August 28, 2002 3:15 pm).