Generic FunctionPackage:
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version


Arguments: durationspec &key start end

Returns the duration denoted by durationspec. durationspec should be a duration specifyier. start and end are bounding index designators of durationspec. The defaults for start and end are 0 and nil, respectively.

Note the difference between a duration designator and a time-interval designator of a duration. A time-interval designator specifies that a duration begin with the character #\P, as, for example, in "P1Y2MT5H". The corresponding duration designator does not include the initial #\P and would be "1Y2MT5H".


(require :datetime)

(duration-years (duration "2Y10M15DT10H30M20S")) => 2
(duration-months (duration "00021015T103020")) => 10

See also duration-years, duration-months, duration-weeks, duration-days, duration-hours, duration-minutes, duration-seconds, time-interval, add-duration, subtract-duration.

See date-time.htm for information on support in Allegro CL for parsing and generating time expressions using the ISO 8601 standard.

Copyright (c) 1998-2012, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 9.0. This page was not revised from the 8.2 page.
Created 2012.5.30.

Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version