subtract

subtract(date: Date): TimeStampInterval;

The subtract method of the Date primitive type returns the interval between the receiver and the date parameter as a TimeStampInterval value.

The following example shows the use of the subtract method.

vars
    today, tomorrow : Date;
begin
    tomorrow := today + 1;
    write tomorrow.subtract(today);  // Outputs "1:00:00:00.000"
end;

The TimeStampInterval value that is returned does not take daylight saving into account.