Common Lisp Package: PERIODS

README:

FUNCTION

Public

ADD-DURATION (LEFT RIGHT)

Add one duration to another.

ADD-TIME (FIXED-TIME DURATION &KEY (REVERSE NIL))

Given a FIXED-TIME, add the supplied DURATION. Example (reader notation requires calling LOCAL-TIME:ENABLE-READ-MACROS): (add-time @2007-05-20T12:10:10.000 (duration :hours 50)) => @2007-05-22T14:10:10.000 NOTE: This function always adds the largest increments first, so: (add-time @2003-01-09 (duration :years 1 :days 20)) => @2004-02-29 If days has been added before years, the result would have been "@2004-03-01".

CURRENT-YEAR

Return the current year as a FIXNUM.

DAY-OF-WEEK (FIXED-TIME)

Return the day of the week associated with a given FIXED-TIME. The result is a FIXNUM with 0 representing Sunday, through 6 on Saturday.

DURATION (&REST ARGS)

Create a DURATION object. One thing to note about duration: there is no way to determine the total length of a duration in terms of any specific time quantity, without first binding that duration to a fixed point in time (after all, how many days are in a month if you don't know which month it is?) Therefore, those looking for a function like "duration-seconds" are really wanting to work with ranges, not just durations.

DURATION-SECONDS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FALLS-ON-WEEKEND-P (FIXED-TIME)

Return T if the given FIXED-TIME occurs on a Saturday or Sunday.

FIND-SMALLEST-RESOLUTION (STEP-BY)

Examine the property list STEP-BY and return the smallest unit of time specified. For example, given the following property list: (:DAY 10 :HOUR 5 :MINUTE 2) The result is :MINUTE.

FIXED-TIME (&REST ARGS)

Return a fixed point in time relative to the time of the call. ARGS is a property list giving a specific precision for the return value. If the keyword argument :NOW is given, all else is ignored; this is equivalent to calling LOCAL-TIME:NOW. Otherwise, any keyword arguments given override their corresponding elements in the current time. Further, any elements smaller in resolution than the finest specified element are reduced to 0 or 1, according to their position. For example, assuming the current time is "@2007-11-17T23:02:00.000", compare these outputs: (fixed-time :month 4) => @2007-04-01T00:00:00.000 (fixed-time :day 10) => @2007-11-10T00:00:00.000 (fixed-time :hour 15) => @2007-11-17T15:00:00.000 This behavior makes it very easy to return a fixed time for "april of this year", etc. If you wish to determine the date of the previous April, while preserving the current day of the month, hour of the day, etc., then see the function PREVIOUS-TIME.

FLOOR-TIME (FIXED-TIME &OPTIONAL RESOLUTION)

Reduce a fixed time to be no finer than RESOLUTION. For example, if the date is 2007-04-20, and the resolution is :month, the date is floored to 2007-04-01. Anything smaller than the resolution is reduced to zero (or 1, if it is a day or month being reduced).

LEAPP (YEAR)

Return T if YEAR falls on a leap year.

SUBTRACT-DURATION (LEFT RIGHT)

Subtract one duration from another.

TIME-DIFFERENCE (LEFT RIGHT)

Compute the duration existing between fixed-times LEFT and RIGHT. The order of left or right is ignored; the returned DURATION, if added to the earlier value, will result in the later. A complexity of this process which might surprise some is that larger quantities are added by ADD-TIME before smaller quantities. For example, what is the difference between 2003-02-10 and 2004-03-01? If you add years before days, the difference is 1 year and 20 days. If you were to add days before years, however, the difference would be 1 year and 21 days. The question, do you advance to 2004 and then calculate between 2-10 and 3-01, or do you move from 2-10 to 3-01, and then increment the year? This library chooses to add years before days, since this follows human reckoning a bit closer (i.e., a person would likely flip to the 2004 calendar and then start counting off days, rather than the other way around). This difference in reckoning can be tricky, however, so bear this in mind.

Undocumented

DAYS-IN-MONTH (MONTH &OPTIONAL YEAR)

SETFDURATION-SECONDS (NEW-VALUE INSTANCE)

PARSE-TIME-PERIOD (STRING)

PARSE-TIME-RANGE (STRING)

READ-FIXED-TIME (STR IN)

SLEEP-UNTIL (FIXED-TIME)

STRFTIME (FIXED-TIME &KEY (FORMAT *OUTPUT-TIME-FORMAT*))

STRPTIME (STRING &KEY (FORMAT *INPUT-TIME-FORMAT*) (DEFAULT-YEAR NIL))

STRPTIME-DECODED (STRING &KEY (FORMAT *INPUT-TIME-FORMAT*))

SUBTRACT-TIME (FIXED-TIME DURATION)

TIME-PERIOD (&REST ARGS)

TIME-PERIOD-GENERATOR (PERIOD)

TIME-RANGE (&REST ARGS)

TIME-RANGE-BEGIN (RANGE)

TIME-RANGE-DURATION (RANGE)

TIME-RANGE-END (RANGE)

TIME-WITHIN-RANGE-P (FIXED-TIME RANGE)

Private

BOUNDED-ADD (LEFT RIGHT BOUND)

A bounded addition operator. Returns: VALUE CARRY.

BOUNDED-SUBTRACT (LEFT RIGHT BOUND)

A bounded subtraction operator. Returns: VALUE CARRY.

DETAILS-MATCH-RELATIVE-TIME-P (RELATIVE-TIME NSEC SS MM HH DAY MONTH YEAR DAY-OF-WEEK DAYLIGHT-P TIMEZONE TZ-ABBREV)

Return T if the given time elements honor the details in RELATIVE-TIME.

DURATION-DAYS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DURATION-HOURS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DURATION-MICROSECONDS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DURATION-MILLISECONDS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DURATION-MINUTES (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DURATION-MONTHS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DURATION-NANOSECONDS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DURATION-YEARS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

ENCLOSING-DURATION (RELATIVE-TIME)

Return a DURATION which, if applied to a time, causes NEXT-TIME to move to the next matching occurrence of that time pattern. For example, if you ask for ':day 18' on Nov 18, it will return the same time back to you. If you add enclosing duration for that relative time to Nov 18 and then ask again, you'll get Dec 18.

GET-RANGE-ANCHOR (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GET-RANGE-BEGIN (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GET-RANGE-BEGIN-INCLUSIVE-P (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GET-RANGE-DURATION (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GET-RANGE-END (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GET-RANGE-END-INCLUSIVE-P (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GET-RANGE-FIXED-BEGIN (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GET-RANGE-FIXED-END (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MATCHES-RELATIVE-TIME-P (FIXED-TIME RELATIVE-TIME)

Return T if the given FIXED-TIME honors the details in RELATIVE-TIME.

MULTIPLY-DURATION (LEFT MULTIPLIER)

Add one duration to another.

NEXT-TIME (ANCHOR RELATIVE-TIME &KEY (REVERSE NIL) (ACCEPT-ANCHOR NIL) (RECURSIVE-CALL NIL))

Compute the first time after FIXED-TIME which matches RELATIVE-TIME. This function finds the first moment after FIXED-TIME which honors every element in RELATIVE-TIME: (next-time @2007-05-20 (relative-time :month 3)) => @2008-03-20 The relative time constructor arguments may also be symbolic: (relative-time :month :this) (relative-time :month :next) (relative-time :month :prev) To find the date two weeks after next February, a combination of NEXT-TIME and ADD-TIME must be used, since "next February" is a relative time concept, while "two weeks" is a duration concept: (add-time (next-time @2007-05-20 (relative-time :month 2)) (duration :days 14)) NOTE: The keyword arguments to RELATIVE-TIME are always singular; those to DURATION are always plural. The following form resolves to the first sunday of the given year: (next-time (previous-time @2007-05-20 (relative-time :month 1 :day 1)) (relative-time :week-day 0)) This form finds the first Friday the 13th after today: (next-time @2007-05-20 (relative-time :day 13 :day-of-week 5)) NOTE: When adding times, NEXT-TIME always seeks the next time that fully honors your request. If asked for Feb 29, the year of the resulting time will fall in a leap year. If asked for Thu, Apr 29, it returns the next occurrence of Apr 29 which falls on a Friday. Example: (next-time @2007-11-01 (relative-time :month 4 :day 29 :day-of-week 4)) => @2010-04-29T00:00:00.000

PREVIOUS-TIME (ANCHOR RELATIVE-TIME &KEY (ACCEPT-ANCHOR NIL))

This function is the reverse of `NEXT-TIME'. Please look there for more.

RELATIVE-TIME-DAY (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RELATIVE-TIME-DAY-OF-WEEK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RELATIVE-TIME-HOUR (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RELATIVE-TIME-MICROSECOND (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RELATIVE-TIME-MILLISECOND (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RELATIVE-TIME-MINUTE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RELATIVE-TIME-MONTH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RELATIVE-TIME-NANOSECOND (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RELATIVE-TIME-SECOND (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RELATIVE-TIME-WEEK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RELATIVE-TIME-YEAR (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TIME-PERIOD-RANGE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TIME-PERIOD-SKIP (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TIME-PERIOD-STEP (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

Undocumented

ADD-DAYS (DURATION DAYS)

ADD-HOURS (DURATION HOURS)

ADD-MICROSECONDS (DURATION MICROSECONDS)

ADD-MILLISECONDS (DURATION MILLISECONDS)

ADD-MINUTES (DURATION MINUTES)

ADD-MONTHS (DURATION MONTHS)

ADD-NANOSECONDS (DURATION NANOSECONDS)

ADD-SECONDS (DURATION SECONDS)

ADD-YEARS (DURATION YEARS)

COMPILE-DURATION (DATA)

COMPILE-RELATIVE-TIME (DATA)

COMPILE-TIME (DATA)

COPY-DURATION (INSTANCE)

COPY-RELATIVE-TIME (INSTANCE)

COPY-TIME-PERIOD (INSTANCE)

COPY-TIME-RANGE (INSTANCE)

DAY-BEGIN (ANCHOR)

DAY-END (ANCHOR &KEY (INCLUSIVE-P NIL))

DAY-OF (FIXED-TIME)

DAY-RANGE (FIXED-TIME &KEY (BEGIN-INCLUSIVE-P T) (END-INCLUSIVE-P NIL))

SETFDURATION-DAYS (NEW-VALUE INSTANCE)

SETFDURATION-HOURS (NEW-VALUE INSTANCE)

SETFDURATION-MICROSECONDS (NEW-VALUE INSTANCE)

SETFDURATION-MILLISECONDS (NEW-VALUE INSTANCE)

SETFDURATION-MINUTES (NEW-VALUE INSTANCE)

SETFDURATION-MONTHS (NEW-VALUE INSTANCE)

SETFDURATION-NANOSECONDS (NEW-VALUE INSTANCE)

DURATION-P (OBJECT)

SETFDURATION-YEARS (NEW-VALUE INSTANCE)

SETFGET-RANGE-ANCHOR (NEW-VALUE INSTANCE)

SETFGET-RANGE-BEGIN (NEW-VALUE INSTANCE)

SETFGET-RANGE-BEGIN-INCLUSIVE-P (NEW-VALUE INSTANCE)

SETFGET-RANGE-DURATION (NEW-VALUE INSTANCE)

SETFGET-RANGE-END (NEW-VALUE INSTANCE)

SETFGET-RANGE-END-INCLUSIVE-P (NEW-VALUE INSTANCE)

SETFGET-RANGE-FIXED-BEGIN (NEW-VALUE INSTANCE)

SETFGET-RANGE-FIXED-END (NEW-VALUE INSTANCE)

HOUR-BEGIN (ANCHOR)

HOUR-END (ANCHOR &KEY (INCLUSIVE-P NIL))

HOUR-OF (FIXED-TIME)

HOUR-RANGE (FIXED-TIME &KEY (BEGIN-INCLUSIVE-P T) (END-INCLUSIVE-P NIL))

IGNORE-CHARACTER (STREAM CHAR)

MAKE-DURATION (&KEY ((YEARS DUM777) 0) ((MONTHS DUM778) 0) ((DAYS DUM779) 0) ((HOURS DUM780) 0) ((MINUTES DUM781) 0) ((SECONDS DUM782) 0) ((MILLISECONDS DUM783) 0) ((MICROSECONDS DUM784) 0) ((NANOSECONDS DUM785) 0))

MAKE-DURATION-RELATIVE (DATA)

MAKE-RELATIVE-TIME (&KEY ((YEAR DUM1926) NIL) ((MONTH DUM1927) NIL) ((WEEK DUM1928) NIL) ((DAY-OF-WEEK DUM1929) NIL) ((DAY DUM1930) NIL) ((HOUR DUM1931) NIL) ((MINUTE DUM1932) NIL) ((SECOND DUM1933) NIL) ((MILLISECOND DUM1934) NIL) ((MICROSECOND DUM1935) NIL) ((NANOSECOND DUM1936) NIL))

MAKE-TIME-PERIOD (&KEY ((RANGE DUM6269) NIL) ((STEP DUM6270) NIL) ((SKIP DUM6271) NIL))

MAKE-TIME-RANGE (&KEY ((FIXED-BEGIN DUM5152) NIL) ((BEGIN DUM5153) NIL) ((BEGIN-INCLUSIVE-P DUM5154) T) ((FIXED-END DUM5155) NIL) ((END DUM5156) NIL) ((END-INCLUSIVE-P DUM5157) NIL) ((DURATION DUM5158) NIL) ((ANCHOR DUM5159) NIL))

MICROSECOND-BEGIN (ANCHOR)

MICROSECOND-END (ANCHOR &KEY (INCLUSIVE-P NIL))

MICROSECOND-OF (FIXED-TIME)

MICROSECOND-PART (BIGNUM)

MILLISECOND-BEGIN (ANCHOR)

MILLISECOND-END (ANCHOR &KEY (INCLUSIVE-P NIL))

MILLISECOND-OF (FIXED-TIME)

MILLISECOND-PART (BIGNUM)

MINUTE-BEGIN (ANCHOR)

MINUTE-END (ANCHOR &KEY (INCLUSIVE-P NIL))

MINUTE-OF (FIXED-TIME)

MINUTE-RANGE (FIXED-TIME &KEY (BEGIN-INCLUSIVE-P T) (END-INCLUSIVE-P NIL))

MONDAY-WEEK-BEGIN (ANCHOR)

MONDAY-WEEK-END (ANCHOR &KEY (INCLUSIVE-P NIL))

MONDAY-WEEK-RANGE (FIXED-TIME &KEY (BEGIN-INCLUSIVE-P T) (END-INCLUSIVE-P NIL))

MONTH-BEGIN (ANCHOR)

MONTH-END (ANCHOR &KEY (INCLUSIVE-P NIL))

MONTH-OF (FIXED-TIME)

MONTH-RANGE (FIXED-TIME &KEY (BEGIN-INCLUSIVE-P T) (END-INCLUSIVE-P NIL))

NANOSECOND-OF (FIXED-TIME)

NANOSECOND-PART (BIGNUM)

NEXT-DAY (&OPTIONAL FIXED-TIME)

NEXT-FRIDAY (ANCHOR &KEY (REVERSE NIL))

NEXT-HOUR (&OPTIONAL FIXED-TIME)

NEXT-MICROSECOND (&OPTIONAL FIXED-TIME)

NEXT-MILLISECOND (&OPTIONAL FIXED-TIME)

NEXT-MINUTE (&OPTIONAL FIXED-TIME)

NEXT-MONDAY (ANCHOR &KEY (REVERSE NIL))

NEXT-MONDAY-WEEK (&OPTIONAL FIXED-TIME)

NEXT-MONTH (&OPTIONAL FIXED-TIME)

NEXT-SATURDAY (ANCHOR &KEY (REVERSE NIL))

NEXT-SECOND (&OPTIONAL FIXED-TIME)

NEXT-SUNDAY (ANCHOR &KEY (REVERSE NIL))

NEXT-SUNDAY-WEEK (&OPTIONAL FIXED-TIME)

NEXT-THURSDAY (ANCHOR &KEY (REVERSE NIL))

NEXT-TUESDAY (ANCHOR &KEY (REVERSE NIL))

NEXT-WEDNESDAY (ANCHOR &KEY (REVERSE NIL))

NEXT-YEAR (&OPTIONAL FIXED-TIME)

P/CARDINAL (IN &OPTIONAL (EOF-ERROR-P T))

P/DAYS-OF-WEEK (IN &OPTIONAL (EOF-ERROR-P T))

P/DURATION-SPEC (IN &OPTIONAL (EOF-ERROR-P T))

P/FIXED-TIME (IN &OPTIONAL (EOF-ERROR-P T))

P/MONTHS-OF-YEAR (IN &OPTIONAL (EOF-ERROR-P T))

P/NUMBER (IN &OPTIONAL (EOF-ERROR-P T))

P/ORDINAL (IN &OPTIONAL (EOF-ERROR-P T))

P/PERIOD-UNIT (IN &OPTIONAL (EOF-ERROR-P T))

P/QUALIFIED-TIME (IN &OPTIONAL (EOF-ERROR-P T))

P/RELATIVE-TIME (IN &OPTIONAL (EOF-ERROR-P T))

P/TIME (IN &OPTIONAL (EOF-ERROR-P T))

P/TIME-DURATION (IN &OPTIONAL (EOF-ERROR-P T))

P/TIME-REFERENCE (IN &OPTIONAL (EOF-ERROR-P T))

P/TIME-UNIT (IN &OPTIONAL (EOF-ERROR-P T))

PEEK-TOKEN (IN &OPTIONAL (EOF-ERROR-P T))

PREVIOUS-DAY (&OPTIONAL FIXED-TIME)

PREVIOUS-FRIDAY (ANCHOR)

PREVIOUS-HOUR (&OPTIONAL FIXED-TIME)

PREVIOUS-MILLISECOND (&OPTIONAL FIXED-TIME)

PREVIOUS-MINUTE (&OPTIONAL FIXED-TIME)

PREVIOUS-MONDAY (ANCHOR)

PREVIOUS-MONDAY-WEEK (&OPTIONAL FIXED-TIME)

PREVIOUS-MONTH (&OPTIONAL FIXED-TIME)

PREVIOUS-NANOSECOND (&OPTIONAL FIXED-TIME)

PREVIOUS-SATURDAY (ANCHOR)

PREVIOUS-SECOND (&OPTIONAL FIXED-TIME)

PREVIOUS-SUNDAY (ANCHOR)

PREVIOUS-SUNDAY-WEEK (&OPTIONAL FIXED-TIME)

PREVIOUS-THURSDAY (ANCHOR)

PREVIOUS-TUESDAY (ANCHOR)

PREVIOUS-WEDNESDAY (ANCHOR)

PREVIOUS-YEAR (&OPTIONAL FIXED-TIME)

RANGE-DEC (VALUE MIN MAX)

RANGE-INC (VALUE MIN MAX)

READ-FROM-STREAM (IN &OPTIONAL (EOF-ERROR-P T))

READ-INTEGER (IN &OPTIONAL LENGTH SKIP-WHITESPACE-P)

READ-TOKEN (IN &OPTIONAL (EOF-ERROR-P T))

RELATIVE-TIME (&REST ARGS)

SETFRELATIVE-TIME-DAY (NEW-VALUE INSTANCE)

SETFRELATIVE-TIME-DAY-OF-WEEK (NEW-VALUE INSTANCE)

RELATIVE-TIME-GENERATOR (ANCHOR RELATIVE-TIME &KEY (REVERSE NIL))

SETFRELATIVE-TIME-HOUR (NEW-VALUE INSTANCE)

SETFRELATIVE-TIME-MICROSECOND (NEW-VALUE INSTANCE)

SETFRELATIVE-TIME-MILLISECOND (NEW-VALUE INSTANCE)

SETFRELATIVE-TIME-MINUTE (NEW-VALUE INSTANCE)

SETFRELATIVE-TIME-MONTH (NEW-VALUE INSTANCE)

SETFRELATIVE-TIME-NANOSECOND (NEW-VALUE INSTANCE)

RELATIVE-TIME-P (OBJECT)

SETFRELATIVE-TIME-SECOND (NEW-VALUE INSTANCE)

RELATIVE-TIME-STEPPER (RELATIVE-TIME &KEY (REVERSE NIL))

SETFRELATIVE-TIME-WEEK (NEW-VALUE INSTANCE)

SETFRELATIVE-TIME-YEAR (NEW-VALUE INSTANCE)

SECOND-BEGIN (ANCHOR)

SECOND-END (ANCHOR &KEY (INCLUSIVE-P NIL))

SECOND-OF (FIXED-TIME)

SECOND-RANGE (FIXED-TIME &KEY (BEGIN-INCLUSIVE-P T) (END-INCLUSIVE-P NIL))

SET-MICROSECOND-PART (BIGNUM USECS)

SET-MILLISECOND-PART (BIGNUM MSECS)

SET-NANOSECOND-PART (BIGNUM NSECS)

SUBTRACT-DAYS (DURATION DAYS)

SUBTRACT-HOURS (DURATION HOURS)

SUBTRACT-MICROSECONDS (DURATION MICROSECONDS)

SUBTRACT-MILLISECONDS (DURATION MILLISECONDS)

SUBTRACT-MINUTES (DURATION MINUTES)

SUBTRACT-MONTHS (DURATION MONTHS)

SUBTRACT-NANOSECONDS (DURATION NANOSECONDS)

SUBTRACT-SECONDS (DURATION SECONDS)

SUBTRACT-YEARS (DURATION YEARS)

SUNDAY-WEEK-BEGIN (ANCHOR)

SUNDAY-WEEK-END (ANCHOR &KEY (INCLUSIVE-P NIL))

SUNDAY-WEEK-RANGE (FIXED-TIME &KEY (BEGIN-INCLUSIVE-P T) (END-INCLUSIVE-P NIL))

THIS-DAY (&OPTIONAL FIXED-TIME)

THIS-DAY-RANGE

THIS-FRIDAY (ANCHOR &KEY (REVERSE NIL))

THIS-HOUR (&OPTIONAL FIXED-TIME)

THIS-HOUR-RANGE

THIS-MICROSECOND (&OPTIONAL FIXED-TIME)

THIS-MILLISECOND (&OPTIONAL FIXED-TIME)

THIS-MINUTE (&OPTIONAL FIXED-TIME)

THIS-MINUTE-RANGE

THIS-MONDAY (ANCHOR &KEY (REVERSE NIL))

THIS-MONDAY-WEEK (&OPTIONAL FIXED-TIME)

THIS-MONDAY-WEEK-RANGE

THIS-MONTH (&OPTIONAL FIXED-TIME)

THIS-MONTH-RANGE

THIS-SATURDAY (ANCHOR &KEY (REVERSE NIL))

THIS-SECOND (&OPTIONAL FIXED-TIME)

THIS-SECOND-RANGE

THIS-SUNDAY (ANCHOR &KEY (REVERSE NIL))

THIS-SUNDAY-WEEK (&OPTIONAL FIXED-TIME)

THIS-SUNDAY-WEEK-RANGE

THIS-THURSDAY (ANCHOR &KEY (REVERSE NIL))

THIS-TUESDAY (ANCHOR &KEY (REVERSE NIL))

THIS-WEDNESDAY (ANCHOR &KEY (REVERSE NIL))

THIS-YEAR (&OPTIONAL FIXED-TIME)

THIS-YEAR-RANGE

TIME-GENERATOR (START DURATION &KEY (REVERSE NIL))

TIME-PARSER-TESTS

TIME-PERIOD-BEGIN (PERIOD)

TIME-PERIOD-END (PERIOD)

TIME-PERIOD-P (OBJECT)

SETFTIME-PERIOD-RANGE (NEW-VALUE INSTANCE)

SETFTIME-PERIOD-SKIP (NEW-VALUE INSTANCE)

SETFTIME-PERIOD-STEP (NEW-VALUE INSTANCE)

TIME-RANGE-ANCHOR (RANGE)

TIME-RANGE-BEGIN-INCLUSIVE-P (RANGE)

TIME-RANGE-END-INCLUSIVE-P (RANGE)

TIME-RANGE-NEXT (RANGE)

TIME-RANGE-P (OBJECT)

TIME-RANGE-PREVIOUS (RANGE)

TIME-STEPPER (DURATION &KEY (REVERSE NIL))

TIME-WITHIN-BEGIN-END-P (FIXED-TIME BEGIN END)

UNREAD-TOKEN (IN TOKEN)

YEAR-BEGIN (ANCHOR)

YEAR-END (ANCHOR &KEY (INCLUSIVE-P NIL))

YEAR-OF (FIXED-TIME)

YEAR-RANGE (FIXED-TIME &KEY (BEGIN-INCLUSIVE-P T) (END-INCLUSIVE-P NIL))

MACRO

Private

DO-RELATIVE-TIMES ((VAR ANCHOR RELATIVE-TIME END &OPTIONAL (RESULT NIL)) &BODY BODY)

A 'do' style version of the functional MAP-RELATIVE-TIMES macro. The disadvantage to DO-RELATIVE-TIMES is that there is no way to ask for a reversed time sequence, or specify an inclusive endpoint.

DO-TIMES ((VAR START DURATION END &OPTIONAL (RESULT NIL)) &BODY BODY)

A 'do' style version of the functional MAP-TIMES macro. The disadvantage to DO-TIMES is that there is no way to ask for a reversed time sequence, or specify an inclusive endpoint.

LIST-RELATIVE-TIMES (ANCHOR RELATIVE-TIME END &KEY (REVERSE NIL) (INCLUSIVE-P NIL))

Return a list of all times within the given range.

LIST-TIMES (START DURATION END &KEY (REVERSE NIL) (INCLUSIVE-P NIL))

Return a list of all times within the given range.

LOOP-TIMES (FORMS START DURATION END &KEY (REVERSE NIL) (INCLUSIVE-P NIL))

Map over a set of times separated by DURATION, calling CALLABLE with the start of each.

MAP-RELATIVE-TIMES (CALLABLE ANCHOR RELATIVE-TIME END &KEY (REVERSE NIL) (INCLUSIVE-P NIL))

Map over a set of times separated by DURATION, calling CALLABLE with the start of each.

MAP-TIMES (CALLABLE START DURATION END &KEY (REVERSE NIL) (INCLUSIVE-P NIL))

Map over a set of times separated by DURATION, calling CALLABLE with the start of each.

Undocumented

DO-TIME-PERIOD ((BEGIN-VAR END-VAR NEXT-BEGIN-VAR PERIOD &OPTIONAL (RESULT NIL)) &REST BODY)

IF-LET (((VAR VALUE)) &BODY BODY)

LIST-TIME-PERIOD (PERIOD)

LOOP-RELATIVE-TIMES (FORMS ANCHOR RELATIVE-TIME END &KEY (REVERSE NIL) (INCLUSIVE-P NIL))

LOOP-TIME-PERIOD (FORMS PERIOD)

MAP-TIME-PERIOD (CALLABLE PERIOD)

WITH-SKIPPERS (&BODY BODY)

VARIABLE

Public

Undocumented

*INPUT-TIME-FORMAT*

*OUTPUT-TIME-FORMAT*

Private

Undocumented

*DATE-READTABLE*

*DAYS-IN-MONTHS*

*PARSER-READTABLE*

*TOKEN-STACK*

CLASS

Public

Undocumented

DURATION (&REST ARGS)

TIME-PERIOD (&REST ARGS)

TIME-RANGE (&REST ARGS)

Private

Undocumented

RELATIVE-TIME (&REST ARGS)