FunctionPackage: util.date-timeToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

complete-date-time

Arguments: date-time

This function is called automatically by date-time when date-time's complete keyword argument is true.

This function updates its argument. If the datetime specifies one of Calendar date, a Week date, or an Ordinal date, then the other date types are calculated and stored in the argument. If the argument specifies a time, then the hourf, minutef, and secondf slots of the argument are calculated and stored in the argument.

Note that the function does not modify the conceptual date-time value of the argument. It merely computes the equivalent representations.

One may not want to call this function if one wants to maintain the slots in the argument as being a representation from the parser of the date-time function. In this case, the complete keyword argument to date-time (the function that does the parsing) should be nil to prevent this function from being called.

Examples

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

 (setq d (date-time "1985-04-12" :complete nil))
  => #<date-time "1985-04-12" @ ...>

 (date-time-ymd-day d) => 12

 ;; The date-time was not completed, so the following accessor returns nil.
 (date-time-yd-day d) => nil

 ;; Update the date-time instance.
 (complete-date-time d) =>  #<date-time "1985-04-12" @ ...>

 (date-time-yd-day d) => 102

See also date-time.

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.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version