Function | Package: util.date-time | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version