CALENDAR-TIMES is a calendar time library implemented on top of LOCAL-TIME library.
It features zoned calendar times and calculations.
(caltime)
Convert CALTIME to UNIVERSAL-TIME.
(caltime &rest changes)
(t1 t2)
(t1 t2)
(t1 t2)
Returns T when the caltimes represent the same point in time.
(t1 t2)
(t1 t2)
(t1 t2 &rest more)
Compose caltimes.
For example, a date + a time = datetime; a date-time + timezone = zoned-datetime..
(datetime)
Returns the DATE of DATETIME
(datetime)
Returns the WALLTIME of DATETIME.
(caltime &optional (format :number))
Return day of week of CALTIME. FORMAT can be either :NUMBER (default) or :NAME.
(day month year)
Create a date object from DAY, MONTH and YEAR.
(seconds minutes hour day month year)
Create a date and time object.
(seconds minutes hour)
Create a time object.
(day month year &optional (timezone local-time:*default-timezone*))
Create a date with a timezone.
(seconds minutes hour day month year &optional
(timezone local-time:*default-timezone*))
Create a datetime with a timezone.
(&optional timezone)
The ZONED-DATETIME now.
(&optional timezone)
The WALLTIME now.
(&optional timezone)
Returns DATE today.
(caltime amount unit &rest more)
(caltime amount unit &rest more)
Return a new caltime from CALTIME reduced in AMOUNT UNITs. Example: (caltime- (now) 2 :day)
(caltime)
Generic caltime to local-time conversion.
(caltime class &rest args)
Convert between different classes of time types.
(t1 t2 &optional unit)
Difference between caltimes, in UNITs.
(t1 t2)
Compare calendar times for equality. This is a structural equality comparison. So, two caltimes that represent the same point in time, but differ in one of its elements (for instance, its timezone), are considered different. Use CALTIME= for equality for caltimes that represent the same point in time.
(caltime &rest args)
(caltime)
Decode a CALTIME parts and return them with VALUES. The order of the list of values is the same as passed to the constructor functions.
(destination caltime &optional format &rest args)
Format CALTIME. Destination can be T, then timestring is written to STANDARD-OUTPUT; can be NIL, then a string is returned; or can be a stream.
(timestring class &rest args)
Parse TIMESTRING and return an instance of CLASS. CLASS should be the class name of one of the subclasses of CALTIME.
Timezone can be a LOCAL-TIME::TIMEZONE object, or an offset.
Abstract calendar time class
A date like 2024-01-01
A datetime like 2024-01-01T00:00:00
Represents a 'wall' time. Like 01:01:22
A date with a timezone.
A datetime with a timezone.