Next Previous Up Top Contents Index

7.6 The DATE module

-

Sealed methods

Summary

Performs subtraction on specific combinations of dates and durations.

Signature

- arg1 arg2 => diff

Arguments

arg1
An instance of <date> or <duration>. See description for details.

arg2
An instance of <duration>, or an instance of <date> if arg1 is a <date>. See description for details.

Values

diff
An instance of <date> or <duration>. See description for details.

Library

system

Module

date

Description

A number of methods are defined for the - generic function to allow subtraction of various combinations of dates and durations. Note that there is not a method defined for every possible combination of date and duration. Specifically, you cannot subtract a date from a duration, and you cannot subtract different types of duration. The return value can be either a date or a duration, depending on the arguments supplied. The table below lists the methods that are defined on -.

Table 7.3 Methods defined for subtraction of dates and durations

arg1

arg2

diff

<year/month-duration>

<year/month-duration>

<year/month-duration>

<day/time-duration>

<day/time-duration>

<day/time-duration>

<date>

<duration>

<date>

<date>

<date>

<day/time-duration>

See also

+, page 129

*, page 131

/, page 132


System and I/O Reference - 31 MAR 2000

Next Previous Up Top Contents Index