| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |
Arguments: date-time
Returns the year (an integer) of the date represented in
date-time if that value can be calculated by
non-nil
slots in date-time, and returns
nil
otherwise. date-time
must be a date-time
object.
There is no year slot in a date-time
instance. This function
calculates its value from other slots (such as
ymd-yd-century
and
ymd-yd-year-in-century
). If nil
is returned, it may be because the date-time
is not
complete (so needed slots are not filled in) or because the date
portion is incomplete (needed information is not available, such as
when a relative date -- "85-10-10" -- is all that is provided.) In the
first case, applying complete-date-time will fill in
needed slots. In the second case, it will not.
(require :datetime) (use-package :util.date-time) ;; date-time is 1985/04/12 10:15:30, that is 15 and a half ;; minutes after 10 AM April 12, 1985. (setq a (date-time "1985-04-12T10:15:30")) (date-time-year a) -> 1985
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.
| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |