FunctionPackage: util.date-timeToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

parse-iso8601

Arguments: iso8601-text &key start end expanded-digits fraction-digits date

Returns a time-interval or a date-time object based on iso8601-text, which should be a string with suitable contents.

If the iso8601-text argument contains either a #\P, #\R, or #\/, then the return value is equivalent to the following:

(require :datetime)
(use-package :util.date-time)

(time-interval iso8601-text :start start :end end)

Otherwise, the return value is equivalent to the following:

(require :datetime)
(use-package :util.date-time)

(date-time iso8601-text :start start :end end :date date
                          :expanded-digits expanded-digits
                          :fraction-digits fraction-digits)

See time-interval and date-time for details of the keyword arguments.

Examples

(require :datetime)
(use-package :util.date-time)

 (parse-iso8601 "R5/2002-03-01T13:00:00Z/P1Y2M10DT2H30M"))
=> #<time-interval R5/2002-03-01T13:00:00Z/P1Y2M10DT2H30M0S @ ...>

 (parse-iso8601 "19850412T23:20:50")
=> #<date-time "1985-04-12T23:20:50" @ ...>

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-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version