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


Arguments: date-time defaults &key copy

This function returns a date-time object constructed by filling in any unsupplied components in date-time with the corresponding values from defaults. Both date-time and defaults must be date-time objects.

When copy is true a new date-time instance is created. When copy is false (the default), the date-time argument is overwritten with the return value.


cl-user(5) (require :datetime)
cl-user(6) (use-package
;; DATE-TIME does not have a century specified, and DEFAULTS has
;; only a century. The result has complete date info but no time info:
cl-user(7): (merge-date-times (date-time "06-04-12") (date-time "2000"))
#<date-time "2006-04-12" @ #x4aefc12>
;;  Here DATE-TIME and DEFAULTS both have seconds specified (including
;;  fractional seconds in the case of DATE-TIME. The result uses the
;;  DATE-TIME seconds and fractional seconds values, but takes other
;;  values unspecified in DATE-TIME from DEFAULTS:
cl-user(8): (merge-date-times (date-time "T--50,5")
                   (date-time "2006-05-13T22:30:51,14+02:00"))
#<date-time "2006-05-13T22:30:50,5+02:00" @ #x4af9382>

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 9.0 page.
Created 2015.5.21.

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