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

merge-date-times

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.

Examples

cl-user(5) (require :datetime)
t
cl-user(6) (use-package :util.date-time)
t
;; 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>
cl-user(9): 

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.

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