Home Segments Index Top Previous Next

540: Mainline

Instances that can be said to be less than, equal to, or greater than one another are said to be magnitudes. Thus, times and dates are magnitudes, and, like the Number class, the Time and Date classes are direct subclasses of the Magnitude class.

On the other hand, many arithmetic operations make no sense when used with dates and times. For example, neither can you multiply a Date instance times an integer, nor can you raise a Time instance to a power:

Workspace
Date today * 3                  <-- Message not understood 
Workspace
Time now raisedTo: 8            <-- Message not understood