simple-date-time

API Reference

simple-date-time

date and time library for common lisp

SIMPLE-DATE-TIME

  • Variable *DEFAULT-TIMEZONE*
    (-
     (car
      (last (multiple-value-list (decode-universal-time (get-universal-time))))))
    Default timezone. GMT is 0. JST is 9. EST is -5.
  • Class DATE-TIME
    YEAR   Reader: YEAR-OF
    MONTH   Reader: MONTH-OF
    DAY   Reader: DAY-OF
    HOUR   Reader: HOUR-OF
    MINUTE   Reader: MINUTE-OF
    SECOND   Reader: SECOND-OF
    MILLISECOND   Reader: MILLISECOND-OF
  • Function CLONE (date-time)
  • Function SERIALIZE (date-time)
    Calculates integer milliseconds from DATE-TIME object beginning of time (Jan 1 1 0:0:0)
  • Function NORMALIZE (date-time)
    Returns a DATE-TIME object with date slots adjusted to be within normal bounds.
  • Function DESERIALIZE (millisecond)
    Returns a normalized DATE-TIME object from input in milliseconds from beginning of date-time (1 1 1 0:0:0).
  • Function DAY-OF-WEEK-OF (date-time)
  • Function DAY-NAME-OF (date)
  • Function MONTH-NAME-OF (date)
  • Function DAY+ (date-time delta)
    Function adds X to DATE-TIME object slot without normalizing.
  • Function HOUR+ (date-time delta)
    Function adds X to DATE-TIME object slot without normalizing.
  • Function MINUTE+ (date-time delta)
    Function adds X to DATE-TIME object slot without normalizing.
  • Function SECOND+ (date-time delta)
    Function adds X to DATE-TIME object slot without normalizing.
  • Function MILLISECOND+ (date-time delta)
    Function adds X to DATE-TIME object slot without normalizing.
  • Function YEAR+ (date-time delta)
    Increments YEAR-OF DATE-TIME object by DELTA. Does not normalize the result.
  • Function MONTH+ (date-time delta)
    Increments MONTH-OF DATE-TIME object by DELTA. Does not normalize the result.
  • Function DATE= (dt1 dt2)
    Compare two DATE-TIME objects for date1 = date2
  • Function DATE< (dt1 dt2)
    Compare two DATE-TIME objects for date1 < date2
  • Function TIME= (dt1 dt2)
    Compare two DATE-TIME objects for time1 = time2
  • Function TIME< (dt1 dt2)
    Compare two DATE-TIME objects for time1 < time2
  • Function DATE-TIME= (dt1 dt2)
    Compare two DATE-TIME objects for both date1 = date2 and time1 = time2.
  • Function DATE-TIME< (dt1 dt2)
    Compare two DATE-TIME objects for date1 < date2
  • Function DATE/= (dt1 dt2)
  • Function DATE<= (dt1 dt2)
  • Function DATE> (dt1 dt2)
  • Function DATE>= (dt1 dt2)
  • Function TIME/= (dt1 dt2)
  • Function TIME<= (dt1 dt2)
  • Function TIME> (dt1 dt2)
  • Function TIME>= (dt1 dt2)
  • Function DATE-TIME/= (dt1 dt2)
  • Function DATE-TIME<= (dt1 dt2)
  • Function DATE-TIME> (dt1 dt2)
  • Function DATE-TIME>= (dt1 dt2)
  • Function 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.
  • Function MAKE-DATE (year month day)
    Constructs a DATE-TIME object from given date arguments.
  • Function MAKE-TIME (hour minute second &optional (millisecond 0))
    Constructs a DATE-TIME object from given time arguments.
  • Function FROM-UNIVERSAL-TIME (&optional (universal-time (get-universal-time)) (millisecond 0))
    Returns a DATE-TIME object set from UNIVERSAL-TIME (default is now)
  • Function TO-UNIVERSAL-TIME (date-time &optional (timezone *default-timezone*))
    Returns the universal time for DATE-TIME object (truncating milliseconds).
  • Function FROM-POSIX-TIME (time)
    Returns a DATE-TIME object from posix TIME
  • Function NOW
    Returns DATE-TIME object set to the current time.
  • Function TODAY
    Returns a DATE-TIME object set to the start of the current day.
  • Function TOMORROW
    Returns a DATE-TIME object set to the start of the day following the current day.
  • Function YESTERDAY
    Returns a DATE-TIME object set to the start of the day before the current day.
  • Function FROM-STRING (string &key format (timezone *default-timezone*))
    Returns a DATE-TIME object set from parsing STRING.
  • Function YYYY/MM/DD (date-time)
    Write string for DATE-TIME object in format: yyyy/mm/dd
  • Function YYYY-MM-DD (date-time)
    Write string for DATE-TIME object in format: yyyy-mm-dd
  • Function YY/MM/DD (date-time)
    Write string for DATE-TIME object in format: yy/mm/dd
  • Function YY-MM-DD (date-time)
    Write string for DATE-TIME object in format: yy-mm-dd
  • Function YY.MM.DD (date-time)
    Write string for DATE-TIME object in format: yy.mm.dd
  • Function hh:mm (date-time)
    Write string for DATE-TIME object in format: hh:mm
  • Function yyyy-mm-dd hh:mm (date-time)
    Write string for DATE-TIME object in format: yyyy-mm-dd hh:mm
  • Function yyyy-mm-dd hh:mm:ss (date-time)
    Write string for DATE-TIME object in format: yyyy-mm-dd hh:mm:ss
  • Function YYYYMMDD (date-time)
    Write string for DATE-TIME object in format: yyyymmdd
  • Function yyyymmddThhmmssZ (date-time)
    Write string for DATE-TIME object in format: YYYYMMDD'T'HHMMSS'Z'
  • Function HTTP-DATE (date-time &optional (timezone *default-timezone*))
    Write string for HTTP-Date
  • Function RFC-2822 (date-time &optional (timezone 0))
    Write string for DATE-TIME object as per rfc-2822 (including time zone).