The local-time-duration Reference Manual

Table of Contents

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

The local-time-duration Reference Manual

This is the local-time-duration Reference Manual, version 1.0, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 15:14:01 2018 GMT+0.


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

1 Systems

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


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

1.1 local-time-duration

Author

WebCheckout, Inc.

License

MIT

Description

local-time-duration: Simple duration functionality on top of local-time

Version

1.0

Dependencies
Source

local-time-duration.asd (file)

Components

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

2 Files

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


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

2.1 Lisp


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

2.1.1 local-time-duration.asd

Location

local-time-duration.asd

Systems

local-time-duration (system)

Packages

local-time-duration-system


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

2.1.2 local-time-duration/package.lisp

Parent

local-time-duration (system)

Location

package.lisp

Packages

local-time-duration


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

2.1.3 local-time-duration/defcomparator.lisp

Dependency

package.lisp (file)

Parent

local-time-duration (system)

Location

defcomparator.lisp

Internal Definitions

%defcomparator (macro)


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

2.1.4 local-time-duration/duration.lisp

Dependency

defcomparator.lisp (file)

Parent

local-time-duration (system)

Location

duration.lisp

Exported Definitions
Internal Definitions

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

2.1.5 local-time-duration/format.lisp

Dependency

duration.lisp (file)

Parent

local-time-duration (system)

Location

format.lisp

Exported Definitions

human-readable-duration (function)

Internal Definitions

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

2.1.6 local-time-duration/timestamp.lisp

Dependency

format.lisp (file)

Parent

local-time-duration (system)

Location

timestamp.lisp

Exported Definitions

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

2.1.7 local-time-duration/iso8601.lisp

Dependency

timestamp.lisp (file)

Parent

local-time-duration (system)

Location

iso8601.lisp

Exported Definitions

parse-iso8601-duration (function)

Internal Definitions

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

3 Packages

Packages are listed by definition order.


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

3.1 local-time-duration-system

Source

local-time-duration.asd

Use List

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

3.2 local-time-duration

Source

package.lisp (file)

Nickname

ltd

Use List
Exported Definitions
Internal Definitions

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

4 Definitions

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


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

4.1 Exported definitions


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

4.1.1 Compiler macros

Compiler Macro: duration/= &rest ITEMS
Package

local-time-duration

Source

duration.lisp (file)

Compiler Macro: duration< &rest ITEMS
Package

local-time-duration

Source

duration.lisp (file)

Compiler Macro: duration<= &rest ITEMS
Package

local-time-duration

Source

duration.lisp (file)

Compiler Macro: duration= &rest ITEMS
Package

local-time-duration

Source

duration.lisp (file)

Compiler Macro: duration> &rest ITEMS
Package

local-time-duration

Source

duration.lisp (file)

Compiler Macro: duration>= &rest ITEMS
Package

local-time-duration

Source

duration.lisp (file)


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

4.1.2 Functions

Function: duration &key WEEK DAY HOUR MINUTE SEC NSEC

Returns a new duration instance representing the sum of the ‘WEEK‘, ‘DAY‘, ‘HOUR‘, ‘MINUTE‘, ‘SEC‘, and ‘NSEC‘ arguments. Durations are normalized, that is, (duration :hour 1) and (duration :minute 60) will result in duration instances with the same internal representation.

Package

local-time-duration

Source

duration.lisp (file)

Function: duration* DURATION FACTOR

Returns a fresh duration as long as ‘DURATION‘ multiplied by ‘FACTOR‘.

Package

local-time-duration

Source

duration.lisp (file)

Function: duration+ &rest DURATIONS

Returns a fresh duration representing the sum of the lengths of its arguments.

Package

local-time-duration

Source

duration.lisp (file)

Function: duration- &rest DURATIONS

Returns a fresh duration representing the result of subtracting the length of each argument in turn.

Package

local-time-duration

Source

duration.lisp (file)

Function: duration-as DURATION UNIT

Returns two values: the first is the number of whole ‘UNIT‘s within ‘DURATION‘, and the second is a fresh duration representing the reamainder of the original duration after dividing it by ‘UNIT‘. ‘UNIT‘ must be one of :week, :day, :hour, :minute, :sec, and :nsec.

Package

local-time-duration

Source

duration.lisp (file)

Function: duration-maximum DURATION &rest DURATIONS
Package

local-time-duration

Source

duration.lisp (file)

Function: duration-minimum DURATION &rest DURATIONS
Package

local-time-duration

Source

duration.lisp (file)

Function: duration/ DURATION DIVISOR

Returns a fresh duration that is as long as ‘DURATION‘ divided by ‘DIVISOR‘.

Package

local-time-duration

Source

duration.lisp (file)

Function: duration/= &rest ITEMS

Returns ‘T‘ if every duration is not equally long, else returns ‘NIL‘.

Package

local-time-duration

Source

duration.lisp (file)

Function: duration< &rest ITEMS

Returns ‘T‘ if every duration is shorter than the preceding duration, else returns ‘NIL‘.

Package

local-time-duration

Source

duration.lisp (file)

Function: duration<= &rest ITEMS

Returns ‘T‘ if every duration is shorter than or equal to the preceding duration, else returns ‘NIL‘.

Package

local-time-duration

Source

duration.lisp (file)

Function: duration= &rest ITEMS

Returns ‘T‘ if every duration is equally long, else returns ‘NIL‘.

Package

local-time-duration

Source

duration.lisp (file)

Function: duration> &rest ITEMS

Returns ‘T‘ if every duration is longer than the preceding duration, else returns ‘NIL‘.

Package

local-time-duration

Source

duration.lisp (file)

Function: duration>= &rest ITEMS

Returns ‘T‘ if every duration is longer than or equal to the preceding duration, else returns ‘NIL‘.

Package

local-time-duration

Source

duration.lisp (file)

Function: human-readable-duration DURATION &optional STREAM
Package

local-time-duration

Source

format.lisp (file)

Function: parse-iso8601-duration STRING

Parser for ISO8601 durations (with limitations) returning DURATION instances.

http://en.wikipedia.org/wiki/ISO_8601#Durations

The only, known, divergence from the syntax specified is that
fractional values are allowed anywhere and not only in the smallest value.

Package

local-time-duration

Source

iso8601.lisp (file)

Function: timestamp-difference TIME-A TIME-B

Returns a duration representing the time elapsed between the timestamps ‘TIME-A‘ and ‘TIME-B‘. This duration may be negative if ‘TIME-B‘ is later than ‘TIME-A‘.

Package

local-time-duration

Source

timestamp.lisp (file)

Function: timestamp-duration+ TIMESTAMP DURATION

Returns a fresh timestamp representing the time when ‘DURATION‘ has elapsed after ‘TIMESTAMP‘.

Package

local-time-duration

Source

timestamp.lisp (file)

Function: timestamp-duration- TIMESTAMP DURATION

Returns a fresh timestamp representing the time when ‘DURATION‘ will elapse before ‘TIMESTAMP‘.

Package

local-time-duration

Source

timestamp.lisp (file)


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

4.1.3 Classes

Class: duration ()

A duration instance represents a period of time with no additional context (e.g., starting or ending time or location).

Package

local-time-duration

Source

duration.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
  • print-object (method)
  • nsec-of (method)
  • nsec-of (method)
  • sec-of (method)
  • sec-of (method)
  • day-of (method)
  • day-of (method)
Direct slots
Slot: day
Type

integer

Initargs

:day

Initform

0

Readers

day-of (generic function)

Writers

(setf day-of) (generic function)

Slot: sec
Type

integer

Initargs

:sec

Initform

0

Readers

sec-of (generic function)

Writers

(setf sec-of) (generic function)

Slot: nsec
Type

integer

Initargs

:nsec

Initform

0

Readers

nsec-of (generic function)

Writers

(setf nsec-of) (generic function)


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

4.2 Internal definitions


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

4.2.1 Constants

Constant: +nsecs-per-day+
Package

local-time-duration

Source

duration.lisp (file)

Constant: +nsecs-per-hour+
Package

local-time-duration

Source

duration.lisp (file)

Constant: +nsecs-per-minute+
Package

local-time-duration

Source

duration.lisp (file)

Constant: +nsecs-per-second+
Package

local-time-duration

Source

duration.lisp (file)

Constant: +nsecs-per-week+
Package

local-time-duration

Source

duration.lisp (file)


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

4.2.2 Macros

Macro: %defcomparator NAME (TYPE) &body BODY
Package

local-time-duration

Source

defcomparator.lisp (file)

Macro: with-designated-stream (VAR STREAM) &body BODY

Binds VAR to the stream designated (as per cl:format’s stream argument) by the value STREAM and executes BODY.

If STREAM is nil VAR will be bound to a string-output-stream and the resulting string will be returned, otherwise the actual stream object used will be returned. In either case the return value of BODY is ignored.

Package

local-time-duration

Source

format.lisp (file)


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

4.2.3 Functions

Function: %duration-compare A B
Package

local-time-duration

Source

duration.lisp (file)

Function: %duration/= A B
Package

local-time-duration

Source

duration.lisp (file)

Function: %duration< A B
Package

local-time-duration

Source

duration.lisp (file)

Function: %duration<= A B
Package

local-time-duration

Source

duration.lisp (file)

Function: %duration= A B
Package

local-time-duration

Source

duration.lisp (file)

Function: %duration> A B
Package

local-time-duration

Source

duration.lisp (file)

Function: %duration>= A B
Package

local-time-duration

Source

duration.lisp (file)

Function: call-with-designated-stream STREAM THUNK
Package

local-time-duration

Source

format.lisp (file)

Function: char-string-to-integer CHARS
Package

local-time-duration

Source

iso8601.lisp (file)

Function: decode-duration DURATION &key WEEKS

Returns, as multiple values, DURATION’s logical components:

(nsecs secs minutes hours days weeks months years)

If WEEKS is T days the days component of DURATION will first be used to compute an integral number of weeks, and the remainder days will be returned. If WEEKS is NIL (the default) the weeks value will always be 0 and the whole number of days will be returned as DAYS.

In the current implementation MONTHS and YEARS are always 0.

Package

local-time-duration

Source

duration.lisp (file)

Function: format-iso8601-duration DESTINATION DURATION
Package

local-time-duration

Source

iso8601.lisp (file)

Function: make-duration-from-time-values VALUES
Package

local-time-duration

Source

iso8601.lisp (file)

Function: pretty-seconds SECS NSECS
Package

local-time-duration

Source

format.lisp (file)

Function: production-hms-to-list HOUR MINUTE SECOND
Package

local-time-duration

Source

iso8601.lisp (file)

Function: production-ymd-to-list YEAR MONTH DAY
Package

local-time-duration

Source

iso8601.lisp (file)


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

4.2.4 Generic functions

Generic Function: day-of OBJECT
Generic Function: (setf day-of) NEW-VALUE OBJECT
Package

local-time-duration

Methods
Method: day-of (DURATION duration)

automatically generated reader method

Source

duration.lisp (file)

Method: (setf day-of) NEW-VALUE (DURATION duration)

automatically generated writer method

Source

duration.lisp (file)

Generic Function: nsec-of OBJECT
Generic Function: (setf nsec-of) NEW-VALUE OBJECT
Package

local-time-duration

Methods
Method: nsec-of (DURATION duration)

automatically generated reader method

Source

duration.lisp (file)

Method: (setf nsec-of) NEW-VALUE (DURATION duration)

automatically generated writer method

Source

duration.lisp (file)

Generic Function: sec-of OBJECT
Generic Function: (setf sec-of) NEW-VALUE OBJECT
Package

local-time-duration

Methods
Method: sec-of (DURATION duration)

automatically generated reader method

Source

duration.lisp (file)

Method: (setf sec-of) NEW-VALUE (DURATION duration)

automatically generated writer method

Source

duration.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L  
Index Entry  Section

F
File, Lisp, local-time-duration.asd: The local-time-duration<dot>asd file
File, Lisp, local-time-duration/defcomparator.lisp: The local-time-duration/defcomparator<dot>lisp file
File, Lisp, local-time-duration/duration.lisp: The local-time-duration/duration<dot>lisp file
File, Lisp, local-time-duration/format.lisp: The local-time-duration/format<dot>lisp file
File, Lisp, local-time-duration/iso8601.lisp: The local-time-duration/iso8601<dot>lisp file
File, Lisp, local-time-duration/package.lisp: The local-time-duration/package<dot>lisp file
File, Lisp, local-time-duration/timestamp.lisp: The local-time-duration/timestamp<dot>lisp file

L
Lisp File, local-time-duration.asd: The local-time-duration<dot>asd file
Lisp File, local-time-duration/defcomparator.lisp: The local-time-duration/defcomparator<dot>lisp file
Lisp File, local-time-duration/duration.lisp: The local-time-duration/duration<dot>lisp file
Lisp File, local-time-duration/format.lisp: The local-time-duration/format<dot>lisp file
Lisp File, local-time-duration/iso8601.lisp: The local-time-duration/iso8601<dot>lisp file
Lisp File, local-time-duration/package.lisp: The local-time-duration/package<dot>lisp file
Lisp File, local-time-duration/timestamp.lisp: The local-time-duration/timestamp<dot>lisp file
local-time-duration.asd: The local-time-duration<dot>asd file
local-time-duration/defcomparator.lisp: The local-time-duration/defcomparator<dot>lisp file
local-time-duration/duration.lisp: The local-time-duration/duration<dot>lisp file
local-time-duration/format.lisp: The local-time-duration/format<dot>lisp file
local-time-duration/iso8601.lisp: The local-time-duration/iso8601<dot>lisp file
local-time-duration/package.lisp: The local-time-duration/package<dot>lisp file
local-time-duration/timestamp.lisp: The local-time-duration/timestamp<dot>lisp file

Jump to:   F   L  

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

A.2 Functions

Jump to:   %   (  
C   D   F   G   H   M   N   P   S   T   W  
Index Entry  Section

%
%defcomparator: Internal macros
%duration-compare: Internal functions
%duration/=: Internal functions
%duration<: Internal functions
%duration<=: Internal functions
%duration=: Internal functions
%duration>: Internal functions
%duration>=: Internal functions

(
(setf day-of): Internal generic functions
(setf day-of): Internal generic functions
(setf nsec-of): Internal generic functions
(setf nsec-of): Internal generic functions
(setf sec-of): Internal generic functions
(setf sec-of): Internal generic functions

C
call-with-designated-stream: Internal functions
char-string-to-integer: Internal functions
Compiler Macro, duration/=: Exported compiler macros
Compiler Macro, duration<: Exported compiler macros
Compiler Macro, duration<=: Exported compiler macros
Compiler Macro, duration=: Exported compiler macros
Compiler Macro, duration>: Exported compiler macros
Compiler Macro, duration>=: Exported compiler macros

D
day-of: Internal generic functions
day-of: Internal generic functions
decode-duration: Internal functions
duration: Exported functions
duration*: Exported functions
duration+: Exported functions
duration-: Exported functions
duration-as: Exported functions
duration-maximum: Exported functions
duration-minimum: Exported functions
duration/: Exported functions
duration/=: Exported compiler macros
duration/=: Exported functions
duration<: Exported compiler macros
duration<: Exported functions
duration<=: Exported compiler macros
duration<=: Exported functions
duration=: Exported compiler macros
duration=: Exported functions
duration>: Exported compiler macros
duration>: Exported functions
duration>=: Exported compiler macros
duration>=: Exported functions

F
format-iso8601-duration: Internal functions
Function, %duration-compare: Internal functions
Function, %duration/=: Internal functions
Function, %duration<: Internal functions
Function, %duration<=: Internal functions
Function, %duration=: Internal functions
Function, %duration>: Internal functions
Function, %duration>=: Internal functions
Function, call-with-designated-stream: Internal functions
Function, char-string-to-integer: Internal functions
Function, decode-duration: Internal functions
Function, duration: Exported functions
Function, duration*: Exported functions
Function, duration+: Exported functions
Function, duration-: Exported functions
Function, duration-as: Exported functions
Function, duration-maximum: Exported functions
Function, duration-minimum: Exported functions
Function, duration/: Exported functions
Function, duration/=: Exported functions
Function, duration<: Exported functions
Function, duration<=: Exported functions
Function, duration=: Exported functions
Function, duration>: Exported functions
Function, duration>=: Exported functions
Function, format-iso8601-duration: Internal functions
Function, human-readable-duration: Exported functions
Function, make-duration-from-time-values: Internal functions
Function, parse-iso8601-duration: Exported functions
Function, pretty-seconds: Internal functions
Function, production-hms-to-list: Internal functions
Function, production-ymd-to-list: Internal functions
Function, timestamp-difference: Exported functions
Function, timestamp-duration+: Exported functions
Function, timestamp-duration-: Exported functions

G
Generic Function, (setf day-of): Internal generic functions
Generic Function, (setf nsec-of): Internal generic functions
Generic Function, (setf sec-of): Internal generic functions
Generic Function, day-of: Internal generic functions
Generic Function, nsec-of: Internal generic functions
Generic Function, sec-of: Internal generic functions

H
human-readable-duration: Exported functions

M
Macro, %defcomparator: Internal macros
Macro, with-designated-stream: Internal macros
make-duration-from-time-values: Internal functions
Method, (setf day-of): Internal generic functions
Method, (setf nsec-of): Internal generic functions
Method, (setf sec-of): Internal generic functions
Method, day-of: Internal generic functions
Method, nsec-of: Internal generic functions
Method, sec-of: Internal generic functions

N
nsec-of: Internal generic functions
nsec-of: Internal generic functions

P
parse-iso8601-duration: Exported functions
pretty-seconds: Internal functions
production-hms-to-list: Internal functions
production-ymd-to-list: Internal functions

S
sec-of: Internal generic functions
sec-of: Internal generic functions

T
timestamp-difference: Exported functions
timestamp-duration+: Exported functions
timestamp-duration-: Exported functions

W
with-designated-stream: Internal macros

Jump to:   %   (  
C   D   F   G   H   M   N   P   S   T   W  

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

A.3 Variables

Jump to:   +  
C   D   N   S  
Index Entry  Section

+
+nsecs-per-day+: Internal constants
+nsecs-per-hour+: Internal constants
+nsecs-per-minute+: Internal constants
+nsecs-per-second+: Internal constants
+nsecs-per-week+: Internal constants

C
Constant, +nsecs-per-day+: Internal constants
Constant, +nsecs-per-hour+: Internal constants
Constant, +nsecs-per-minute+: Internal constants
Constant, +nsecs-per-second+: Internal constants
Constant, +nsecs-per-week+: Internal constants

D
day: Exported classes

N
nsec: Exported classes

S
sec: Exported classes
Slot, day: Exported classes
Slot, nsec: Exported classes
Slot, sec: Exported classes

Jump to:   +  
C   D   N   S  

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

A.4 Data types

Jump to:   C   D   L   P   S  
Index Entry  Section

C
Class, duration: Exported classes

D
duration: Exported classes

L
local-time-duration: The local-time-duration system
local-time-duration: The local-time-duration package
local-time-duration-system: The local-time-duration-system package

P
Package, local-time-duration: The local-time-duration package
Package, local-time-duration-system: The local-time-duration-system package

S
System, local-time-duration: The local-time-duration system

Jump to:   C   D   L   P   S