Next Previous Up Top Contents Index

7.6 The DATE module

+

Sealed methods

Summary

Performs addition on specific combinations of dates and durations.

Signature

+ arg1 arg2 => sum

Arguments

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

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

Values

sum
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 summing 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 sum different types of duration, and you cannot sum two dates. 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.2 Methods defined for addition of dates and durations

arg1

arg2

sum

<duration>

<duration>

<duration>

<year/month-duration>

<year/month-duration>

<year/month-duration>

<day/time-duration>

<day/time-duration>

<day/time-duration>

<date>

<duration>

<date>

<duration>

<date>

<date>

See also

-, page 130

*, page 131

/, page 132


System and I/O Reference - 31 MAR 2000

Next Previous Up Top Contents Index