anchor.diff:             #:local-time/=
              #:local-time-max
              #:local-time-min
  -           #:local-time-adjust
  +           #:adjust-local-time
  +           #:adjust-local-time!
              #:local-time-whole-year-difference
  -           #:local-time-adjust-days
              #:days-in-month
  -           #:modified-local-time
  -           #:adjusted-local-time
              #:local-time-
              #:local-time+
              #:encode-duration
  
positive.code:             (timestamp2 (encode-local-time 0 0 0 0 1 month2 year2)))
          (- (day-of timestamp2) (day-of timestamp1))))))
  
  (defun fix-overflow-in-days (day month year)
    "In case the day number is higher than the maximal possible for the given month/year pair, returns the last day of the month."
    (let ((max-day (days-in-month month year)))
  
negative.code: (defun local-time-day-of-week (local-time)
    (mod (+ 3 (day-of local-time)) 7))
  
  ;; TODO read http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html (or something else, sorry :)
  ;; this scheme only works back until 1582, the start of the gregorian calendar.
  ;; see also DECODE-LOCAL-TIME when fixing if fixing is desired at all.
  (defun encode-local-time-into-values (nsec sec minute hour day month year &key (timezone *default-timezone*))
    "Returns (VALUES NSEC SEC DAY ZONE) ready to be used for instantiating a new local-time object."
    (declare (type integer nsec sec minute hour day month year)
             (type (or null timezone) timezone))
    (let* ((0-based-rotated-month (if (>= month 3)
                                      (- month 3)
                                      (+ month 9)))
           (internal-year (if (< month 3)
                              (- year 2001)
                              (- year 2000)))
           (years-as-days (years-to-days internal-year))
           (zone (realize-timezone timezone))
           (sec (+ (* hour 3600)
                   (* minute 60)
                   sec))
           (days-from-zero-point (+ years-as-days
                                    (aref #.+rotated-month-offsets-without-leap-day+ 0-based-rotated-month)
                                    (1- day))))
      (values nsec sec days-from-zero-point zone)))
  
  (defun encode-local-time (nsec sec minute hour day month year &key (timezone *default-timezone*) into)
    "Return a new LOCAL-TIME instance corresponding to the specified time elements."
    (declare (type integer nsec sec minute hour day month year)
             (type (or null timezone) timezone))
    (multiple-value-bind (nsec sec day timezone)
        (encode-local-time-into-values nsec sec minute hour day month year :timezone timezone)
      (if into
          (progn
            (setf (nsec-of into) nsec)
            (setf (sec-of into) sec)
            (setf (day-of into) day)
            (setf (timezone-of into) timezone)
            into)
          (make-local-time
           :nsec nsec
           :sec sec
           :day day
           :timezone timezone))))
  
  (defun local-time (&key universal unix nsec timezone)
    "Produce a LOCAL-TIME instance from the provided numeric time representation or try to extract the most accurate current time if none of them is provided."
  