Home Segments Index Top Previous Next

533: Mainline

You can add or subtract Time instances using the addTime: and subtractTime: methods:

Workspace
Time1 := Time fromSeconds: 40271. 
Time2 := Time fromSeconds: 3600. 
Transcript show: Time1 printString; cr; 
           show: Time2 printString; cr; 
           show: (Time1 addTime: Time2) printString; cr; 
           show: (Time1 subtractTime: Time2) printString; cr; 
           show: (Time2 subtractTime: Time1) printString; cr 
Transcript 
11:11:11 
01:00:00 
12:11:11 
10:11:11 
13:48:49