Common Lisp Package: SIMPLE-DATE-TIME

README:

FUNCTION

Public

DATE-TIME< (DT1 DT2)

Compare two DATE-TIME objects for date1 < date2

DATE-TIME= (DT1 DT2)

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

DATE< (DT1 DT2)

Compare two DATE-TIME objects for date1 < date2

DATE= (DT1 DT2)

Compare two DATE-TIME objects for date1 = date2

DAY+ (DATE-TIME DELTA)

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

DESERIALIZE (MILLISECOND)

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

FROM-POSIX-TIME (TIME)

Returns a DATE-TIME object from posix TIME

FROM-STRING (STRING &OPTIONAL FORMAT)

Returns a DATE-TIME object set from parsing STRING.

FROM-UNIVERSAL-TIME (&OPTIONAL (UNIVERSAL-TIME (GET-UNIVERSAL-TIME)) (MILLISECOND 0))

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

hh:mm (DATE-TIME)

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

HOUR+ (DATE-TIME DELTA)

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

HTTP-DATE (DATE-TIME &OPTIONAL TIMEZONE)

Write string for HTTP-Date

MAKE-DATE (YEAR MONTH DAY)

Constructs a DATE-TIME object from given date arguments.

MAKE-DATE-TIME (YEAR MONTH DAY &OPTIONAL (HOUR 0) (MINUTE 0) (SECOND 0) (MILLISECOND 0))

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

MAKE-TIME (HOUR MINUTE SECOND &OPTIONAL (MILLISECOND 0))

Constructs a DATE-TIME object from given time arguments.

MILLISECOND+ (DATE-TIME DELTA)

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

MINUTE+ (DATE-TIME DELTA)

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

MONTH+ (DATE-TIME DELTA)

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

NORMALIZE (DATE-TIME)

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

NOW

Returns DATE-TIME object set to the current time.

RFC-2822 (DATE-TIME &OPTIONAL (TIMEZONE 0))

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

SECOND+ (DATE-TIME DELTA)

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

SERIALIZE (DATE-TIME)

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

TIME< (DT1 DT2)

Compare two DATE-TIME objects for time1 < time2

TIME= (DT1 DT2)

Compare two DATE-TIME objects for time1 = time2

TO-UNIVERSAL-TIME (DATE-TIME)

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

TODAY

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

TOMORROW

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

YEAR+ (DATE-TIME DELTA)

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

YESTERDAY

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

YY-MM-DD (DATE-TIME)

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

YY.MM.DD (DATE-TIME)

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

YY/MM/DD (DATE-TIME)

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

YYYY-MM-DD (DATE-TIME)

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

yyyy-mm-dd hh:mm (DATE-TIME)

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

yyyy-mm-dd hh:mm:ss (DATE-TIME)

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

YYYY/MM/DD (DATE-TIME)

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

YYYYMMDD (DATE-TIME)

Write string for DATE-TIME object in format: yyyymmdd

yyyymmddThhmmssZ (DATE-TIME)

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

Undocumented

DATE-TIME/= (DT1 DT2)

DATE-TIME<= (DT1 DT2)

DATE-TIME> (DT1 DT2)

DATE-TIME>= (DT1 DT2)

DATE/= (DT1 DT2)

DATE<= (DT1 DT2)

DATE> (DT1 DT2)

DATE>= (DT1 DT2)

DAY-NAME-OF (DATE)

DAY-OF-WEEK-OF (DATE-TIME)

MONTH-NAME-OF (DATE)

TIME/= (DT1 DT2)

TIME<= (DT1 DT2)

TIME> (DT1 DT2)

TIME>= (DT1 DT2)

WEEK-OF (DATE-TIME)

Private

NORMALIZE-DATE (DATE-TIME)

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

Undocumented

DAYS-OF-MONTH (YEAR MONTH)

DAYS-OF-YEAR (YEAR)

ENSURE-LAST-DAY-OF-MONTH (DATE-TIME)

FROM-SHORT-MONTH-NAME (MONTH-NAME)

FROM-STRING-WITH-FORMAT (STRING FORMAT)

LEAP-YEAR-P (YEAR)

NORMALIZE-TIME (DATE-TIME)

SERIALIZE-DATE (DATE-TIME)

SERIALIZE-TIME (DATE-TIME)

SLOT-ACCESSOR

Public

Undocumented

DAY-OF (OBJECT)

SETFDAY-OF (NEW-VALUE OBJECT)

HOUR-OF (OBJECT)

SETFHOUR-OF (NEW-VALUE OBJECT)

MILLISECOND-OF (OBJECT)

SETFMILLISECOND-OF (NEW-VALUE OBJECT)

MINUTE-OF (OBJECT)

SETFMINUTE-OF (NEW-VALUE OBJECT)

MONTH-OF (OBJECT)

SETFMONTH-OF (NEW-VALUE OBJECT)

SECOND-OF (OBJECT)

SETFSECOND-OF (NEW-VALUE OBJECT)

YEAR-OF (OBJECT)

SETFYEAR-OF (NEW-VALUE OBJECT)

VARIABLE

Private

Undocumented

*LEAP-YEAR-DAYS-OF-MONTH*

*NORMAL-YEAR-DAYS-OF-MONTH*

*SHORT-MONTH-NAMES*

CLASS

Public

Undocumented

DATE-TIME

CONSTANT

Private

Undocumented

+POSIX-EPOCH+