| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |