The simple-date-time Reference Manual

This is the simple-date-time Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:42:14 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 simple-date-time

date and time library for common lisp

Author

TAHARA Yoshinori <>

License

BSD

Version

0.1.0

Dependency

cl-ppcre (system).

Source

simple-date-time.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 simple-date-time/simple-date-time.asd

Source

simple-date-time.asd.

Parent Component

simple-date-time (system).

ASDF Systems

simple-date-time.


3.1.2 simple-date-time/package.lisp

Source

simple-date-time.asd.

Parent Component

simple-date-time (system).

Packages

simple-date-time.


3.1.3 simple-date-time/date-time.lisp

Dependency

package.lisp (file).

Source

simple-date-time.asd.

Parent Component

simple-date-time (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 simple-date-time

Source

package.lisp.

Nicknames
  • date-time
  • dt
Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Special variables

Special Variable: *default-timezone*

Default timezone. GMT is 0. JST is 9. EST is -5.

Package

simple-date-time.

Source

date-time.lisp.


5.1.2 Ordinary functions

Function: clone (date-time)
Package

simple-date-time.

Source

date-time.lisp.

Function: date-time/= (dt1 dt2)
Package

simple-date-time.

Source

date-time.lisp.

Function: date-time< (dt1 dt2)

Compare two DATE-TIME objects for date1 < date2

Package

simple-date-time.

Source

date-time.lisp.

Function: date-time<= (dt1 dt2)
Package

simple-date-time.

Source

date-time.lisp.

Function: date-time= (dt1 dt2)

Compare two DATE-TIME objects for both date1 = date2 and time1 = time2.

Package

simple-date-time.

Source

date-time.lisp.

Function: date-time> (dt1 dt2)
Package

simple-date-time.

Source

date-time.lisp.

Function: date-time>= (dt1 dt2)
Package

simple-date-time.

Source

date-time.lisp.

Function: date/= (dt1 dt2)
Package

simple-date-time.

Source

date-time.lisp.

Function: date< (dt1 dt2)

Compare two DATE-TIME objects for date1 < date2

Package

simple-date-time.

Source

date-time.lisp.

Function: date<= (dt1 dt2)
Package

simple-date-time.

Source

date-time.lisp.

Function: date= (dt1 dt2)

Compare two DATE-TIME objects for date1 = date2

Package

simple-date-time.

Source

date-time.lisp.

Function: date> (dt1 dt2)
Package

simple-date-time.

Source

date-time.lisp.

Function: date>= (dt1 dt2)
Package

simple-date-time.

Source

date-time.lisp.

Function: day+ (date-time delta)

Function adds X to DATE-TIME object slot without normalizing.

Package

simple-date-time.

Source

date-time.lisp.

Function: day-name-of (date)
Package

simple-date-time.

Source

date-time.lisp.

Function: day-of-week-of (date-time)
Package

simple-date-time.

Source

date-time.lisp.

Function: deserialize (millisecond)

Returns a normalized DATE-TIME object from input in milliseconds from beginning of date-time (1 1 1 0:0:0).

Package

simple-date-time.

Source

date-time.lisp.

Function: from-posix-time (time)

Returns a DATE-TIME object from posix TIME

Package

simple-date-time.

Source

date-time.lisp.

Function: from-string (string &key format timezone)

Returns a DATE-TIME object set from parsing STRING.

Package

simple-date-time.

Source

date-time.lisp.

Function: from-universal-time (&optional universal-time millisecond)

Returns a DATE-TIME object set from UNIVERSAL-TIME (default is now)

Package

simple-date-time.

Source

date-time.lisp.

Function: hh:mm (date-time)

Write string for DATE-TIME object in format: hh:mm

Package

simple-date-time.

Source

date-time.lisp.

Function: hour+ (date-time delta)

Function adds X to DATE-TIME object slot without normalizing.

Package

simple-date-time.

Source

date-time.lisp.

Function: http-date (date-time &optional timezone)

Write string for HTTP-Date

Package

simple-date-time.

Source

date-time.lisp.

Function: make-date (year month day)

Constructs a DATE-TIME object from given date arguments.

Package

simple-date-time.

Source

date-time.lisp.

Function: make-date-time (year month day &optional hour minute second millisecond)

Constructs a DATE-TIME object from given date and optional time arguments.

Package

simple-date-time.

Source

date-time.lisp.

Function: make-time (hour minute second &optional millisecond)

Constructs a DATE-TIME object from given time arguments.

Package

simple-date-time.

Source

date-time.lisp.

Function: millisecond+ (date-time delta)

Function adds X to DATE-TIME object slot without normalizing.

Package

simple-date-time.

Source

date-time.lisp.

Function: minute+ (date-time delta)

Function adds X to DATE-TIME object slot without normalizing.

Package

simple-date-time.

Source

date-time.lisp.

Function: month+ (date-time delta)

Increments MONTH-OF DATE-TIME object by DELTA. Does not normalize the result.

Package

simple-date-time.

Source

date-time.lisp.

Function: month-name-of (date)
Package

simple-date-time.

Source

date-time.lisp.

Function: normalize (date-time)

Returns a DATE-TIME object with date slots adjusted to be within normal bounds.

Package

simple-date-time.

Source

date-time.lisp.

Function: now ()

Returns DATE-TIME object set to the current time.

Package

simple-date-time.

Source

date-time.lisp.

Function: rfc-2822 (date-time &optional timezone)

Write string for DATE-TIME object as per rfc-2822 (including time zone).

Package

simple-date-time.

Source

date-time.lisp.

Function: second+ (date-time delta)

Function adds X to DATE-TIME object slot without normalizing.

Package

simple-date-time.

Source

date-time.lisp.

Function: serialize (date-time)

Calculates integer milliseconds from DATE-TIME object beginning of time (Jan 1 1 0:0:0)

Package

simple-date-time.

Source

date-time.lisp.

Function: time/= (dt1 dt2)
Package

simple-date-time.

Source

date-time.lisp.

Function: time< (dt1 dt2)

Compare two DATE-TIME objects for time1 < time2

Package

simple-date-time.

Source

date-time.lisp.

Function: time<= (dt1 dt2)
Package

simple-date-time.

Source

date-time.lisp.

Function: time= (dt1 dt2)

Compare two DATE-TIME objects for time1 = time2

Package

simple-date-time.

Source

date-time.lisp.

Function: time> (dt1 dt2)
Package

simple-date-time.

Source

date-time.lisp.

Function: time>= (dt1 dt2)
Package

simple-date-time.

Source

date-time.lisp.

Function: to-universal-time (date-time &optional timezone)

Returns the universal time for DATE-TIME object (truncating milliseconds).

Package

simple-date-time.

Source

date-time.lisp.

Function: today ()

Returns a DATE-TIME object set to the start of the current day.

Package

simple-date-time.

Source

date-time.lisp.

Function: tomorrow ()

Returns a DATE-TIME object set to the start of the day following the current day.

Package

simple-date-time.

Source

date-time.lisp.

Function: week-of (date-time)
Package

simple-date-time.

Alias for

day-of-week-of.

Function: year+ (date-time delta)

Increments YEAR-OF DATE-TIME object by DELTA. Does not normalize the result.

Package

simple-date-time.

Source

date-time.lisp.

Function: yesterday ()

Returns a DATE-TIME object set to the start of the day before the current day.

Package

simple-date-time.

Source

date-time.lisp.

Function: yy-mm-dd (date-time)

Write string for DATE-TIME object in format: yy-mm-dd

Package

simple-date-time.

Source

date-time.lisp.

Function: yy.mm.dd (date-time)

Write string for DATE-TIME object in format: yy.mm.dd

Package

simple-date-time.

Source

date-time.lisp.

Function: yy/mm/dd (date-time)

Write string for DATE-TIME object in format: yy/mm/dd

Package

simple-date-time.

Source

date-time.lisp.

Function: yyyy-mm-dd (date-time)

Write string for DATE-TIME object in format: yyyy-mm-dd

Package

simple-date-time.

Source

date-time.lisp.

Function: yyyy-mm-dd⎵hh:mm (date-time)

Write string for DATE-TIME object in format: yyyy-mm-dd hh:mm

Package

simple-date-time.

Source

date-time.lisp.

Function: yyyy-mm-dd⎵hh:mm:ss (date-time)

Write string for DATE-TIME object in format: yyyy-mm-dd hh:mm:ss

Package

simple-date-time.

Source

date-time.lisp.

Function: yyyy/mm/dd (date-time)

Write string for DATE-TIME object in format: yyyy/mm/dd

Package

simple-date-time.

Source

date-time.lisp.

Function: yyyymmdd (date-time)

Write string for DATE-TIME object in format: yyyymmdd

Package

simple-date-time.

Source

date-time.lisp.

Function: yyyymmddthhmmssz (date-time)

Write string for DATE-TIME object in format: YYYYMMDD’T’HHMMSS’Z’

Package

simple-date-time.

Source

date-time.lisp.


5.1.3 Generic functions

Generic Reader: day-of (object)
Package

simple-date-time.

Methods
Reader Method: day-of ((date-time date-time))

automatically generated reader method

Source

date-time.lisp.

Target Slot

day.

Generic Reader: hour-of (object)
Package

simple-date-time.

Methods
Reader Method: hour-of ((date-time date-time))

automatically generated reader method

Source

date-time.lisp.

Target Slot

hour.

Generic Reader: millisecond-of (object)
Package

simple-date-time.

Methods
Reader Method: millisecond-of ((date-time date-time))

automatically generated reader method

Source

date-time.lisp.

Target Slot

millisecond.

Generic Reader: minute-of (object)
Package

simple-date-time.

Methods
Reader Method: minute-of ((date-time date-time))

automatically generated reader method

Source

date-time.lisp.

Target Slot

minute.

Generic Reader: month-of (object)
Package

simple-date-time.

Methods
Reader Method: month-of ((date-time date-time))

automatically generated reader method

Source

date-time.lisp.

Target Slot

month.

Generic Reader: second-of (object)
Package

simple-date-time.

Methods
Reader Method: second-of ((date-time date-time))

automatically generated reader method

Source

date-time.lisp.

Target Slot

second.

Generic Reader: year-of (object)
Package

simple-date-time.

Methods
Reader Method: year-of ((date-time date-time))

automatically generated reader method

Source

date-time.lisp.

Target Slot

year.


5.1.4 Standalone methods

Method: initialize-instance :after ((date-time date-time) &rest args)
Source

date-time.lisp.

Method: print-object ((date-time date-time) stream)
Source

date-time.lisp.


5.1.5 Classes

Class: date-time
Package

simple-date-time.

Source

date-time.lisp.

Direct methods
Direct slots
Slot: year
Initargs

:year

Readers

year-of.

Writers

This slot is read-only.

Slot: month
Initargs

:month

Readers

month-of.

Writers

This slot is read-only.

Slot: day
Initargs

:day

Readers

day-of.

Writers

This slot is read-only.

Slot: hour
Initargs

:hour

Readers

hour-of.

Writers

This slot is read-only.

Slot: minute
Initargs

:minute

Readers

minute-of.

Writers

This slot is read-only.

Slot: second
Package

common-lisp.

Initargs

:second

Readers

second-of.

Writers

This slot is read-only.

Slot: millisecond
Initform

0

Initargs

:millisecond

Readers

millisecond-of.

Writers

This slot is read-only.


5.2 Internals


5.2.1 Constants

Constant: +posix-epoch+
Package

simple-date-time.

Source

date-time.lisp.


5.2.2 Special variables

Special Variable: *leap-year-days-of-month*
Package

simple-date-time.

Source

date-time.lisp.

Special Variable: *normal-year-days-of-month*
Package

simple-date-time.

Source

date-time.lisp.

Special Variable: *short-month-names*
Package

simple-date-time.

Source

date-time.lisp.


5.2.3 Ordinary functions

Function: days-of-month (year month)
Package

simple-date-time.

Source

date-time.lisp.

Function: days-of-year (year)
Package

simple-date-time.

Source

date-time.lisp.

Function: ensure-last-day-of-month (date-time)
Package

simple-date-time.

Source

date-time.lisp.

Function: from-short-month-name (month-name)
Package

simple-date-time.

Source

date-time.lisp.

Function: from-string-with-format (string format)
Package

simple-date-time.

Source

date-time.lisp.

Function: leap-year-p (year)
Package

simple-date-time.

Source

date-time.lisp.

Function: normalize-date (date-time)

Returns a DATE-TIME object with date slots adjusted so they are all within normal bounds.

Package

simple-date-time.

Source

date-time.lisp.

Function: normalize-time (date-time)
Package

simple-date-time.

Source

date-time.lisp.

Function: serialize-date (date-time)
Package

simple-date-time.

Source

date-time.lisp.

Function: serialize-time (date-time)
Package

simple-date-time.

Source

date-time.lisp.

Function: yyyy/mm/dd⎵hh:mm (date-time)

Write string for DATE-TIME object in format: yyyy/mm/dd hh:mm

Package

simple-date-time.

Source

date-time.lisp.

Function: yyyy/mm/dd⎵hh:mm:ss (date-time)

Write string for DATE-TIME object in format: yyyy/mm/dd hh:mm:ss

Package

simple-date-time.

Source

date-time.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   C   D   E   F   G   H   I   L   M   N   P   R   S   T   W   Y  
Index Entry  Section

C
clone: Public ordinary functions

D
date-time/=: Public ordinary functions
date-time<: Public ordinary functions
date-time<=: Public ordinary functions
date-time=: Public ordinary functions
date-time>: Public ordinary functions
date-time>=: Public ordinary functions
date/=: Public ordinary functions
date<: Public ordinary functions
date<=: Public ordinary functions
date=: Public ordinary functions
date>: Public ordinary functions
date>=: Public ordinary functions
day+: Public ordinary functions
day-name-of: Public ordinary functions
day-of: Public generic functions
day-of: Public generic functions
day-of-week-of: Public ordinary functions
days-of-month: Private ordinary functions
days-of-year: Private ordinary functions
deserialize: Public ordinary functions

E
ensure-last-day-of-month: Private ordinary functions

F
from-posix-time: Public ordinary functions
from-short-month-name: Private ordinary functions
from-string: Public ordinary functions
from-string-with-format: Private ordinary functions
from-universal-time: Public ordinary functions
Function, clone: Public ordinary functions
Function, date-time/=: Public ordinary functions
Function, date-time<: Public ordinary functions
Function, date-time<=: Public ordinary functions
Function, date-time=: Public ordinary functions
Function, date-time>: Public ordinary functions
Function, date-time>=: Public ordinary functions
Function, date/=: Public ordinary functions
Function, date<: Public ordinary functions
Function, date<=: Public ordinary functions
Function, date=: Public ordinary functions
Function, date>: Public ordinary functions
Function, date>=: Public ordinary functions
Function, day+: Public ordinary functions
Function, day-name-of: Public ordinary functions
Function, day-of-week-of: Public ordinary functions
Function, days-of-month: Private ordinary functions
Function, days-of-year: Private ordinary functions
Function, deserialize: Public ordinary functions
Function, ensure-last-day-of-month: Private ordinary functions
Function, from-posix-time: Public ordinary functions
Function, from-short-month-name: Private ordinary functions
Function, from-string: Public ordinary functions
Function, from-string-with-format: Private ordinary functions
Function, from-universal-time: Public ordinary functions
Function, hh:mm: Public ordinary functions
Function, hour+: Public ordinary functions
Function, http-date: Public ordinary functions
Function, leap-year-p: Private ordinary functions
Function, make-date: Public ordinary functions
Function, make-date-time: Public ordinary functions
Function, make-time: Public ordinary functions
Function, millisecond+: Public ordinary functions
Function, minute+: Public ordinary functions
Function, month+: Public ordinary functions
Function, month-name-of: Public ordinary functions
Function, normalize: Public ordinary functions
Function, normalize-date: Private ordinary functions
Function, normalize-time: Private ordinary functions
Function, now: Public ordinary functions
Function, rfc-2822: Public ordinary functions
Function, second+: Public ordinary functions
Function, serialize: Public ordinary functions
Function, serialize-date: Private ordinary functions
Function, serialize-time: Private ordinary functions
Function, time/=: Public ordinary functions
Function, time<: Public ordinary functions
Function, time<=: Public ordinary functions
Function, time=: Public ordinary functions
Function, time>: Public ordinary functions
Function, time>=: Public ordinary functions
Function, to-universal-time: Public ordinary functions
Function, today: Public ordinary functions
Function, tomorrow: Public ordinary functions
Function, week-of: Public ordinary functions
Function, year+: Public ordinary functions
Function, yesterday: Public ordinary functions
Function, yy-mm-dd: Public ordinary functions
Function, yy.mm.dd: Public ordinary functions
Function, yy/mm/dd: Public ordinary functions
Function, yyyy-mm-dd: Public ordinary functions
Function, yyyy-mm-dd⎵hh:mm: Public ordinary functions
Function, yyyy-mm-dd⎵hh:mm:ss: Public ordinary functions
Function, yyyy/mm/dd: Public ordinary functions
Function, yyyy/mm/dd⎵hh:mm: Private ordinary functions
Function, yyyy/mm/dd⎵hh:mm:ss: Private ordinary functions
Function, yyyymmdd: Public ordinary functions
Function, yyyymmddthhmmssz: Public ordinary functions

G
Generic Function, day-of: Public generic functions
Generic Function, hour-of: Public generic functions
Generic Function, millisecond-of: Public generic functions
Generic Function, minute-of: Public generic functions
Generic Function, month-of: Public generic functions
Generic Function, second-of: Public generic functions
Generic Function, year-of: Public generic functions

H
hh:mm: Public ordinary functions
hour+: Public ordinary functions
hour-of: Public generic functions
hour-of: Public generic functions
http-date: Public ordinary functions

I
initialize-instance: Public standalone methods

L
leap-year-p: Private ordinary functions

M
make-date: Public ordinary functions
make-date-time: Public ordinary functions
make-time: Public ordinary functions
Method, day-of: Public generic functions
Method, hour-of: Public generic functions
Method, initialize-instance: Public standalone methods
Method, millisecond-of: Public generic functions
Method, minute-of: Public generic functions
Method, month-of: Public generic functions
Method, print-object: Public standalone methods
Method, second-of: Public generic functions
Method, year-of: Public generic functions
millisecond+: Public ordinary functions
millisecond-of: Public generic functions
millisecond-of: Public generic functions
minute+: Public ordinary functions
minute-of: Public generic functions
minute-of: Public generic functions
month+: Public ordinary functions
month-name-of: Public ordinary functions
month-of: Public generic functions
month-of: Public generic functions

N
normalize: Public ordinary functions
normalize-date: Private ordinary functions
normalize-time: Private ordinary functions
now: Public ordinary functions

P
print-object: Public standalone methods

R
rfc-2822: Public ordinary functions

S
second+: Public ordinary functions
second-of: Public generic functions
second-of: Public generic functions
serialize: Public ordinary functions
serialize-date: Private ordinary functions
serialize-time: Private ordinary functions

T
time/=: Public ordinary functions
time<: Public ordinary functions
time<=: Public ordinary functions
time=: Public ordinary functions
time>: Public ordinary functions
time>=: Public ordinary functions
to-universal-time: Public ordinary functions
today: Public ordinary functions
tomorrow: Public ordinary functions

W
week-of: Public ordinary functions

Y
year+: Public ordinary functions
year-of: Public generic functions
year-of: Public generic functions
yesterday: Public ordinary functions
yy-mm-dd: Public ordinary functions
yy.mm.dd: Public ordinary functions
yy/mm/dd: Public ordinary functions
yyyy-mm-dd: Public ordinary functions
yyyy-mm-dd⎵hh:mm: Public ordinary functions
yyyy-mm-dd⎵hh:mm:ss: Public ordinary functions
yyyy/mm/dd: Public ordinary functions
yyyy/mm/dd⎵hh:mm: Private ordinary functions
yyyy/mm/dd⎵hh:mm:ss: Private ordinary functions
yyyymmdd: Public ordinary functions
yyyymmddthhmmssz: Public ordinary functions