The time-interval Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The time-interval Reference Manual

This is the time-interval Reference Manual, version 0.0.1, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:39:20 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

time-interval

Cyrus Harmon

time-interval is a common lisp library for flexibly encoding time intervals. It relies heavily on the local-time library for the representation of particular points in time, or as local-time calls them, timestamps.

The primary motivation for time-interval is to be able to represent periods of time such as "6 months from July 1, 2008". The idea here isn't to represent the start and dates (or times) explicitly, but rather to flexibly represent the interval. The difficulty arises from the fact that a length of time such as "6 months" can't be uniquely represented as a number of days, hours, minutes, etc... Depending on what the starting point is, the number of days (hours, etc...) in a 6-month interval will change. Therefore, we need a way of representing the time intervals and for computing a new exact time given a starting time and a time interval.

Required Libraries:

cl-ppcre, local-time

Classes:

time-interval

The time-interval class is used for representing a given interval of time, such as 6 months, 2 days, 4 hours and 3 seconds. Each of the components can independenly be positive or negative, so we can have, for instance, an interval that represents 1 hour less than two days, by doing:

(make-instance 'time-interval :hours -1 :days 2)

or:

(time-interval :hours -1 :days 2)

Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 time-interval

Author

Cyrus Harmon <ch-lisp@bobobeach.com>

License

BSD

Description

A library for representing intervals of time

Version

0.0.1

Dependencies
Source

time-interval.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Next: , Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 time-interval.asd

Location

time-interval.asd

Systems

time-interval (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 time-interval/package.lisp

Dependency

license (file)

Parent

time-interval (system)

Location

package.lisp

Packages

time-interval


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 time-interval/time-interval.lisp

Dependency

package.lisp (file)

Parent

time-interval (system)

Location

time-interval.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Files   [Contents][Index]

3.2 Other


Next: , Previous: , Up: Other files   [Contents][Index]

3.2.1 time-interval/README

Parent

time-interval (system)

Location

/home/quickbuilder/quicklisp/dists/quicklisp/software/time-interval-20120520-git/README (not found)


Previous: , Up: Other files   [Contents][Index]

3.2.2 time-interval/LICENSE

Dependency

readme (file)

Parent

time-interval (system)

Location

LICENSE


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 time-interval

Source

package.lisp (file)

Nickname

interval

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: copy-time-interval ORIG
Package

time-interval

Source

time-interval.lisp (file)

Function: make-timestamp* &key YEAR MONTH DAY HOUR MINUTE SECOND NANOSECOND
Package

time-interval

Source

time-interval.lisp (file)

Function: negate-time-interval ORIG
Package

time-interval

Source

time-interval.lisp (file)

Function: parse-time-interval-string STRING
Package

time-interval

Source

time-interval.lisp (file)

Function: time-interval &rest ARGS
Package

time-interval

Source

time-interval.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Generic functions

Generic Function: t+ TIME-OR-INTERVAL-1 TIME-OR-INTERVAL-2
Package

time-interval

Source

time-interval.lisp (file)

Methods
Method: t+ (T1 time-interval) (T2 time-interval)
Method: t+ (T1 time-interval) (T2 timestamp)
Method: t+ (T1 timestamp) (T2 time-interval)
Generic Function: t- TIME-OR-INTERVAL-1 TIME-OR-INTERVAL-2
Package

time-interval

Source

time-interval.lisp (file)

Methods
Method: t- (T1 time-interval) (T2 time-interval)
Method: t- (T1 timestamp) (T2 time-interval)

Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Classes

Class: time-interval ()
Package

time-interval

Source

time-interval.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: years
Initargs

:years

Initform

0

Readers

interval-years (generic function)

Writers

(setf interval-years) (generic function)

Slot: months
Initargs

:months

Initform

0

Readers

interval-months (generic function)

Writers

(setf interval-months) (generic function)

Slot: weeks
Initargs

:weeks

Initform

0

Readers

interval-weeks (generic function)

Writers

(setf interval-weeks) (generic function)

Slot: days
Initargs

:days

Initform

0

Readers

interval-days (generic function)

Writers

(setf interval-days) (generic function)

Slot: hours
Initargs

:hours

Initform

0

Readers

interval-hours (generic function)

Writers

(setf interval-hours) (generic function)

Slot: minutes
Initargs

:minutes

Initform

0

Readers

interval-minutes (generic function)

Writers

(setf interval-minutes) (generic function)

Slot: seconds
Initargs

:seconds

Initform

0

Readers

interval-seconds (generic function)

Writers

(setf interval-seconds) (generic function)

Slot: nanoseconds
Initargs

:nanoseconds

Initform

0

Readers

interval-nanoseconds (generic function)

Writers

(setf interval-nanoseconds) (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *unit-hash*
Package

time-interval

Source

time-interval.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: or-zero VALUE
Package

time-interval

Source

time-interval.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: timestamp-add-interval TIME INTERVAL
Package

time-interval

Source

time-interval.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Generic functions

Generic Function: interval-days OBJECT
Generic Function: (setf interval-days) NEW-VALUE OBJECT
Package

time-interval

Methods
Method: interval-days (TIME-INTERVAL time-interval)

automatically generated reader method

Source

time-interval.lisp (file)

Method: (setf interval-days) NEW-VALUE (TIME-INTERVAL time-interval)

automatically generated writer method

Source

time-interval.lisp (file)

Generic Function: interval-hours OBJECT
Generic Function: (setf interval-hours) NEW-VALUE OBJECT
Package

time-interval

Methods
Method: interval-hours (TIME-INTERVAL time-interval)

automatically generated reader method

Source

time-interval.lisp (file)

Method: (setf interval-hours) NEW-VALUE (TIME-INTERVAL time-interval)

automatically generated writer method

Source

time-interval.lisp (file)

Generic Function: interval-minutes OBJECT
Generic Function: (setf interval-minutes) NEW-VALUE OBJECT
Package

time-interval

Methods
Method: interval-minutes (TIME-INTERVAL time-interval)

automatically generated reader method

Source

time-interval.lisp (file)

Method: (setf interval-minutes) NEW-VALUE (TIME-INTERVAL time-interval)

automatically generated writer method

Source

time-interval.lisp (file)

Generic Function: interval-months OBJECT
Generic Function: (setf interval-months) NEW-VALUE OBJECT
Package

time-interval

Methods
Method: interval-months (TIME-INTERVAL time-interval)

automatically generated reader method

Source

time-interval.lisp (file)

Method: (setf interval-months) NEW-VALUE (TIME-INTERVAL time-interval)

automatically generated writer method

Source

time-interval.lisp (file)

Generic Function: interval-nanoseconds OBJECT
Generic Function: (setf interval-nanoseconds) NEW-VALUE OBJECT
Package

time-interval

Methods
Method: interval-nanoseconds (TIME-INTERVAL time-interval)

automatically generated reader method

Source

time-interval.lisp (file)

Method: (setf interval-nanoseconds) NEW-VALUE (TIME-INTERVAL time-interval)

automatically generated writer method

Source

time-interval.lisp (file)

Generic Function: interval-seconds OBJECT
Generic Function: (setf interval-seconds) NEW-VALUE OBJECT
Package

time-interval

Methods
Method: interval-seconds (TIME-INTERVAL time-interval)

automatically generated reader method

Source

time-interval.lisp (file)

Method: (setf interval-seconds) NEW-VALUE (TIME-INTERVAL time-interval)

automatically generated writer method

Source

time-interval.lisp (file)

Generic Function: interval-weeks OBJECT
Generic Function: (setf interval-weeks) NEW-VALUE OBJECT
Package

time-interval

Methods
Method: interval-weeks (TIME-INTERVAL time-interval)

automatically generated reader method

Source

time-interval.lisp (file)

Method: (setf interval-weeks) NEW-VALUE (TIME-INTERVAL time-interval)

automatically generated writer method

Source

time-interval.lisp (file)

Generic Function: interval-years OBJECT
Generic Function: (setf interval-years) NEW-VALUE OBJECT
Package

time-interval

Methods
Method: interval-years (TIME-INTERVAL time-interval)

automatically generated reader method

Source

time-interval.lisp (file)

Method: (setf interval-years) NEW-VALUE (TIME-INTERVAL time-interval)

automatically generated writer method

Source

time-interval.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   O   T  
Index Entry  Section

F
File, Lisp, time-interval.asd: The time-interval<dot>asd file
File, Lisp, time-interval/package.lisp: The time-interval/package<dot>lisp file
File, Lisp, time-interval/time-interval.lisp: The time-interval/time-interval<dot>lisp file
File, other, time-interval/LICENSE: The time-interval/license file
File, other, time-interval/README: The time-interval/readme file

L
Lisp File, time-interval.asd: The time-interval<dot>asd file
Lisp File, time-interval/package.lisp: The time-interval/package<dot>lisp file
Lisp File, time-interval/time-interval.lisp: The time-interval/time-interval<dot>lisp file

O
Other File, time-interval/LICENSE: The time-interval/license file
Other File, time-interval/README: The time-interval/readme file

T
time-interval.asd: The time-interval<dot>asd file
time-interval/LICENSE: The time-interval/license file
time-interval/package.lisp: The time-interval/package<dot>lisp file
time-interval/README: The time-interval/readme file
time-interval/time-interval.lisp: The time-interval/time-interval<dot>lisp file

Jump to:   F   L   O   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
C   F   G   I   M   N   O   P   T  
Index Entry  Section

(
(setf interval-days): Internal generic functions
(setf interval-days): Internal generic functions
(setf interval-hours): Internal generic functions
(setf interval-hours): Internal generic functions
(setf interval-minutes): Internal generic functions
(setf interval-minutes): Internal generic functions
(setf interval-months): Internal generic functions
(setf interval-months): Internal generic functions
(setf interval-nanoseconds): Internal generic functions
(setf interval-nanoseconds): Internal generic functions
(setf interval-seconds): Internal generic functions
(setf interval-seconds): Internal generic functions
(setf interval-weeks): Internal generic functions
(setf interval-weeks): Internal generic functions
(setf interval-years): Internal generic functions
(setf interval-years): Internal generic functions

C
copy-time-interval: Exported functions

F
Function, copy-time-interval: Exported functions
Function, make-timestamp*: Exported functions
Function, negate-time-interval: Exported functions
Function, parse-time-interval-string: Exported functions
Function, time-interval: Exported functions
Function, timestamp-add-interval: Internal functions

G
Generic Function, (setf interval-days): Internal generic functions
Generic Function, (setf interval-hours): Internal generic functions
Generic Function, (setf interval-minutes): Internal generic functions
Generic Function, (setf interval-months): Internal generic functions
Generic Function, (setf interval-nanoseconds): Internal generic functions
Generic Function, (setf interval-seconds): Internal generic functions
Generic Function, (setf interval-weeks): Internal generic functions
Generic Function, (setf interval-years): Internal generic functions
Generic Function, interval-days: Internal generic functions
Generic Function, interval-hours: Internal generic functions
Generic Function, interval-minutes: Internal generic functions
Generic Function, interval-months: Internal generic functions
Generic Function, interval-nanoseconds: Internal generic functions
Generic Function, interval-seconds: Internal generic functions
Generic Function, interval-weeks: Internal generic functions
Generic Function, interval-years: Internal generic functions
Generic Function, t+: Exported generic functions
Generic Function, t-: Exported generic functions

I
interval-days: Internal generic functions
interval-days: Internal generic functions
interval-hours: Internal generic functions
interval-hours: Internal generic functions
interval-minutes: Internal generic functions
interval-minutes: Internal generic functions
interval-months: Internal generic functions
interval-months: Internal generic functions
interval-nanoseconds: Internal generic functions
interval-nanoseconds: Internal generic functions
interval-seconds: Internal generic functions
interval-seconds: Internal generic functions
interval-weeks: Internal generic functions
interval-weeks: Internal generic functions
interval-years: Internal generic functions
interval-years: Internal generic functions

M
Macro, or-zero: Internal macros
make-timestamp*: Exported functions
Method, (setf interval-days): Internal generic functions
Method, (setf interval-hours): Internal generic functions
Method, (setf interval-minutes): Internal generic functions
Method, (setf interval-months): Internal generic functions
Method, (setf interval-nanoseconds): Internal generic functions
Method, (setf interval-seconds): Internal generic functions
Method, (setf interval-weeks): Internal generic functions
Method, (setf interval-years): Internal generic functions
Method, interval-days: Internal generic functions
Method, interval-hours: Internal generic functions
Method, interval-minutes: Internal generic functions
Method, interval-months: Internal generic functions
Method, interval-nanoseconds: Internal generic functions
Method, interval-seconds: Internal generic functions
Method, interval-weeks: Internal generic functions
Method, interval-years: Internal generic functions
Method, t+: Exported generic functions
Method, t+: Exported generic functions
Method, t+: Exported generic functions
Method, t-: Exported generic functions
Method, t-: Exported generic functions

N
negate-time-interval: Exported functions

O
or-zero: Internal macros

P
parse-time-interval-string: Exported functions

T
t+: Exported generic functions
t+: Exported generic functions
t+: Exported generic functions
t+: Exported generic functions
t-: Exported generic functions
t-: Exported generic functions
t-: Exported generic functions
time-interval: Exported functions
timestamp-add-interval: Internal functions

Jump to:   (  
C   F   G   I   M   N   O   P   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
D   H   M   N   S   W   Y  
Index Entry  Section

*
*unit-hash*: Internal special variables

D
days: Exported classes

H
hours: Exported classes

M
minutes: Exported classes
months: Exported classes

N
nanoseconds: Exported classes

S
seconds: Exported classes
Slot, days: Exported classes
Slot, hours: Exported classes
Slot, minutes: Exported classes
Slot, months: Exported classes
Slot, nanoseconds: Exported classes
Slot, seconds: Exported classes
Slot, weeks: Exported classes
Slot, years: Exported classes
Special Variable, *unit-hash*: Internal special variables

W
weeks: Exported classes

Y
years: Exported classes

Jump to:   *  
D   H   M   N   S   W   Y  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S   T  
Index Entry  Section

C
Class, time-interval: Exported classes

P
Package, time-interval: The time-interval package

S
System, time-interval: The time-interval system

T
time-interval: The time-interval system
time-interval: The time-interval package
time-interval: Exported classes

Jump to:   C   P   S   T